Previous: Writing Emacs Primitives, Up: GNU Emacs Internals

E.6 Object Internals

GNU Emacs Lisp manipulates many different types of data. The actual data are stored in a heap and the only access that programs have to it is through pointers. Each pointer is 32 bits wide on 32-bit machines, and 64 bits wide on 64-bit machines; three of these bits are used for the tag that identifies the object's type, and the remainder are used to address the object.

Because Lisp objects are represented as tagged pointers, it is always possible to determine the Lisp data type of any object. The C data type Lisp_Object can hold any Lisp object of any data type. Ordinary variables have type Lisp_Object, which means they can hold any type of Lisp value; you can determine the actual data type only at run time. The same is true for function arguments; if you want a function to accept only a certain type of argument, you must check the type explicitly using a suitable predicate (see Type Predicates).