Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b7acde90
Commit
b7acde90
authored
Jan 24, 1996
by
Karl Heuer
Browse files
(XCAR, XCDR, CAR, CDR): New macros.
(make_number): New macro definition.
parent
31e3a046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
src/lisp.h
src/lisp.h
+20
-1
No files found.
src/lisp.h
View file @
b7acde90
...
...
@@ -307,6 +307,11 @@ extern int pure_size;
((var) = ((EMACS_INT)(type) << VALBITS) + ((EMACS_INT) (ptr) & VALMASK))
#endif
/* Convert a C integer into a Lisp_Object integer. */
#define make_number(N) \
((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
/* During garbage collection, XGCTYPE must be used for extracting types
so that the mark bit is ignored. XMARKBIT accesses the markbit.
Markbits are used only in particular slots of particular structure types.
...
...
@@ -510,6 +515,21 @@ struct Lisp_Cons
Lisp_Object
car
,
cdr
;
};
/* Take the car or cdr of something known to be a cons cell. */
#define XCAR(c) (XCONS ((c))->car)
#define XCDR(c) (XCONS ((c))->cdr)
/* Take the car or cdr of something whose type is not known. */
#define CAR(c) \
(CONSP ((c)) ? XCAR ((c)) \
: NILP ((c)) ? Qnil \
: wrong_type_argument (Qlistp, (c)))
#define CDR(c) \
(CONSP ((c)) ? XCDR ((c)) \
: NILP ((c)) ? Qnil \
: wrong_type_argument (Qlistp, (c)))
/* Like a cons, but records info on where the text lives that it was read from */
/* This is not really in use now */
...
...
@@ -1400,7 +1420,6 @@ extern Lisp_Object Flsh (), Fash ();
extern
Lisp_Object
Fadd1
(),
Fsub1
();
extern
Lisp_Object
make_number
();
extern
Lisp_Object
long_to_cons
();
extern
unsigned
long
cons_to_long
();
extern
void
args_out_of_range
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment