summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-03-12 12:17:58 -0400
committerPeter Eisentraut <peter_e@gmx.net>2018-03-13 09:56:25 -0400
commit6cf86f435472b27bbc5e22c713bca08aa2d94af7 (patch)
treec1722f6bb851bcb468a2d01edf23f872c0b89597 /src/include
parent377b5ac4845c5ffbf992ee95c32d7d16d38b9081 (diff)
Change internal integer representation of Value node
A Value node would store an integer as a long. This causes needless portability risks, as long can be of varying sizes. Change it to use int instead. All code using this was already careful to only store 32-bit values anyway. Reviewed-by: Michael Paquier <michael@paquier.xyz>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/value.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/nodes/value.h b/src/include/nodes/value.h
index 94d09e176ee..16657145153 100644
--- a/src/include/nodes/value.h
+++ b/src/include/nodes/value.h
@@ -34,7 +34,7 @@
* better to use the more general representation.)
*
* Note that an integer-looking string will get lexed as T_Float if
- * the value is too large to fit in a 'long'.
+ * the value is too large to fit in an 'int'.
*
* Nulls, of course, don't need the value part at all.
*----------------------
@@ -44,7 +44,7 @@ typedef struct Value
NodeTag type; /* tag appropriately (eg. T_String) */
union ValUnion
{
- long ival; /* machine integer */
+ int ival; /* machine integer */
char *str; /* string */
} val;
} Value;
@@ -53,7 +53,7 @@ typedef struct Value
#define floatVal(v) atof(((Value *)(v))->val.str)
#define strVal(v) (((Value *)(v))->val.str)
-extern Value *makeInteger(long i);
+extern Value *makeInteger(int i);
extern Value *makeFloat(char *numericStr);
extern Value *makeString(char *str);
extern Value *makeBitString(char *str);