Commit 5c20a7bf authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(union Lisp_Object) [!NO_UNION_TYPE]: Use EMACS_INT and

EMACS_UINT instead of `int' and `unsigned int'.
(XSET) [EXPLICIT_SIGN_EXTEND]: Use EMACS_INT instead of `int'.
parent cf0fb540
...@@ -178,25 +178,25 @@ union Lisp_Object ...@@ -178,25 +178,25 @@ union Lisp_Object
{ {
/* Used for comparing two Lisp_Objects; /* Used for comparing two Lisp_Objects;
also, positive integers can be accessed fast this way. */ also, positive integers can be accessed fast this way. */
int i; EMACS_INT i;
struct struct
{ {
int val: VALBITS; EMACS_INT val : VALBITS;
int type: GCTYPEBITS+1; EMACS_INT type : GCTYPEBITS + 1;
} s; } s;
struct struct
{ {
unsigned int val: VALBITS; EMACS_UINT val : VALBITS;
int type: GCTYPEBITS+1; EMACS_INT type : GCTYPEBITS + 1;
} u; } u;
struct struct
{ {
unsigned int val: VALBITS; EMACS_UINT val : VALBITS;
enum Lisp_Type type: GCTYPEBITS; enum Lisp_Type type : GCTYPEBITS;
/* The markbit is not really part of the value of a Lisp_Object, /* The markbit is not really part of the value of a Lisp_Object,
and is always zero except during garbage collection. */ and is always zero except during garbage collection. */
unsigned int markbit: 1; EMACS_UINT markbit : 1;
} gu; } gu;
} }
Lisp_Object; Lisp_Object;
...@@ -208,25 +208,25 @@ union Lisp_Object ...@@ -208,25 +208,25 @@ union Lisp_Object
{ {
/* Used for comparing two Lisp_Objects; /* Used for comparing two Lisp_Objects;
also, positive integers can be accessed fast this way. */ also, positive integers can be accessed fast this way. */
int i; EMACS_INT i;
struct struct
{ {
int type: GCTYPEBITS+1; EMACS_INT type : GCTYPEBITS+1;
int val: VALBITS; EMACS_INT val : VALBITS;
} s; } s;
struct struct
{ {
int type: GCTYPEBITS+1; EMACS_INT type : GCTYPEBITS+1;
unsigned int val: VALBITS; EMACS_UINT val : VALBITS;
} u; } u;
struct struct
{ {
/* The markbit is not really part of the value of a Lisp_Object, /* The markbit is not really part of the value of a Lisp_Object,
and is always zero except during garbage collection. */ and is always zero except during garbage collection. */
unsigned int markbit: 1; EMACS_UINT markbit : 1;
enum Lisp_Type type: GCTYPEBITS; enum Lisp_Type type : GCTYPEBITS;
unsigned int val: VALBITS; EMACS_UINT val : VALBITS;
} gu; } gu;
} }
Lisp_Object; Lisp_Object;
...@@ -428,7 +428,7 @@ extern int pure_size; ...@@ -428,7 +428,7 @@ extern int pure_size;
#define XPNTR(a) ((a).u.val) #define XPNTR(a) ((a).u.val)
#define XSET(var, vartype, ptr) \ #define XSET(var, vartype, ptr) \
(((var).s.val = ((int) (ptr))), ((var).s.type = ((char) (vartype)))) (((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
#if __GNUC__ >= 2 && defined (__OPTIMIZE__) #if __GNUC__ >= 2 && defined (__OPTIMIZE__)
#define make_number(N) \ #define make_number(N) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment