diff options
| author | Tom Tromey <tromey@redhat.com> | 2013-01-05 19:36:45 -0700 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2013-01-05 19:36:45 -0700 |
| commit | e078a23febca14bc919c5806670479c395e3253e (patch) | |
| tree | e9e4ed91feef744d525264c31974c3ed00146bcd /src/lisp.h | |
| parent | 63d535c829a930207b64fe733228f15a554644b1 (diff) | |
| parent | 7a2657fa3bedbd977f4e11fe030cb4a210c04ab4 (diff) | |
| download | emacs-e078a23febca14bc919c5806670479c395e3253e.tar.gz | |
merge from trunk
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h index 82bf621b62f..e96c9664743 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1,6 +1,7 @@ /* Fundamental definitions for GNU Emacs Lisp interpreter. -Copyright (C) 1985-1987, 1993-1995, 1997-2012 Free Software Foundation, Inc. +Copyright (C) 1985-1987, 1993-1995, 1997-2013 Free Software Foundation, +Inc. This file is part of GNU Emacs. @@ -327,6 +328,10 @@ enum Lisp_Fwd_Type members that are accessible only from C. A Lisp_Misc object is a wrapper for a C struct that can contain anything you like. + Explicit freeing is discouraged for Lisp objects in general. But if + you really need to exploit this, use Lisp_Misc (check free_misc in + alloc.c to see why). There is no way to free a vectorlike object. + To add a new pseudovector type, extend the pvec_type enumeration; to add a new Lisp_Misc, extend the Lisp_Misc_Type enumeration. @@ -336,6 +341,10 @@ enum Lisp_Fwd_Type enumeration and a 1-bit GC markbit) and make sure the overall size of the union is not increased by your addition. + For a new pseudovector, it's highly desirable to limit the size + of your data type by VBLOCK_BYTES_MAX bytes (defined in alloc.c). + Otherwise you will need to change sweep_vectors (also in alloc.c). + Then you will need to add switch branches in print.c (in print_object, to print your object, and possibly also in print_preprocess) and to alloc.c, to mark your object (in @@ -3196,7 +3205,6 @@ extern void keys_of_buffer (void); extern ptrdiff_t marker_position (Lisp_Object); extern ptrdiff_t marker_byte_position (Lisp_Object); extern void clear_charpos_cache (struct buffer *); -extern ptrdiff_t charpos_to_bytepos (ptrdiff_t); extern ptrdiff_t buf_charpos_to_bytepos (struct buffer *, ptrdiff_t); extern ptrdiff_t buf_bytepos_to_charpos (struct buffer *, ptrdiff_t); extern void unchain_marker (struct Lisp_Marker *marker); |
