emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111338: * lisp.h (toplevel): Add two


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111338: * lisp.h (toplevel): Add two notices to the comment about
Date: Wed, 26 Dec 2012 18:10:11 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111338
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2012-12-26 18:10:11 +0400
message:
  * lisp.h (toplevel): Add two notices to the comment about
  defining a new Lisp data type.
modified:
  src/ChangeLog
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-12-26 09:40:45 +0000
+++ b/src/ChangeLog     2012-12-26 14:10:11 +0000
@@ -1,5 +1,10 @@
 2012-12-26  Dmitry Antipov  <address@hidden>
 
+       * lisp.h (toplevel): Add two notices to the comment about
+       defining a new Lisp data type.
+
+2012-12-26  Dmitry Antipov  <address@hidden>
+
        * keyboard.c (record_asynch_buffer_change): Initialize an event
        only if it's really needed.
        * frame.h (enum output_method): Remove output_mac member since

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-12-20 16:09:05 +0000
+++ b/src/lisp.h        2012-12-26 14:10:11 +0000
@@ -325,6 +325,10 @@
    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.
 
@@ -334,6 +338,10 @@
    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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]