emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] dynamic-modules e374b97 11/22: opaque: add comments.


From: Teodor Zlatanov
Subject: [Emacs-diffs] dynamic-modules e374b97 11/22: opaque: add comments.
Date: Thu, 27 Nov 2014 02:01:52 +0000

branch: dynamic-modules
commit e374b97419b54df364e91fdf69446807157c9641
Author: Aurélien Aptel <address@hidden>
Date:   Sun Nov 23 21:13:22 2014 +0100

    opaque: add comments.
---
 modules/opaque/opaque.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/opaque/opaque.c b/modules/opaque/opaque.c
index f1ba759..d20ebeb 100644
--- a/modules/opaque/opaque.c
+++ b/modules/opaque/opaque.c
@@ -19,15 +19,21 @@ DEFUN ("opaque-make", Fopaque_make, Sopaque_make, 3, 3, 0,
   p->a = XINT (a);
   p->b = XINT (b);
   p->c = XINT (c);
+
+  /*
+    store p as a the first slot (index 0) of a Lisp_Save_Value (which
+    is a Lisp_Misc)
+  */
   return make_save_ptr ((void*)p);
 }
 
 EXFUN (Fopaque_free, 1);
 DEFUN ("opaque-free", Fopaque_free, Sopaque_free, 1, 1, 0,
-       doc: "Free opaque type.")
-  (Lisp_Object p)
+       doc: "Free opaque object OBJ.")
+  (Lisp_Object obj)
 {
-  free (XSAVE_POINTER (p, 0));
+  /* the pointer is in the first slot (index 0) */
+  free (XSAVE_POINTER (obj, 0));
   return Qnil;
 }
 



reply via email to

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