This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
minor comment improvements in hv.h and scope.h
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 11 Feb 2016 10:48:58 +0000 (05:48 -0500)
committerTony Cook <tony@develop-help.com>
Mon, 15 Feb 2016 23:46:45 +0000 (10:46 +1100)
-perl doesn't use malloc, it uses Newx (per interp memory)
-say what the return type is of SSNEW

hv.h
scope.h

diff --git a/hv.h b/hv.h
index d7cc42f..b97b224 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -403,7 +403,8 @@ C<SV*>.
 #define HVhek_UTF8     0x01 /* Key is utf8 encoded. */
 #define HVhek_WASUTF8  0x02 /* Key is bytes here, but was supplied as utf8. */
 #define HVhek_UNSHARED 0x08 /* This key isn't a shared hash key. */
 #define HVhek_UTF8     0x01 /* Key is utf8 encoded. */
 #define HVhek_WASUTF8  0x02 /* Key is bytes here, but was supplied as utf8. */
 #define HVhek_UNSHARED 0x08 /* This key isn't a shared hash key. */
-#define HVhek_FREEKEY  0x100 /* Internal flag to say key is malloc()ed.  */
+/* the following flags are options for functions, they are not stored in heks */
+#define HVhek_FREEKEY  0x100 /* Internal flag to say key is Newx()ed.  */
 #define HVhek_PLACEHOLD        0x200 /* Internal flag to create placeholder.
                                * (may change, but Storable is a core module) */
 #define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical form.
 #define HVhek_PLACEHOLD        0x200 /* Internal flag to create placeholder.
                                * (may change, but Storable is a core module) */
 #define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical form.
diff --git a/scope.h b/scope.h
index 1de27ab..9a504f1 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -310,7 +310,7 @@ scope has the given name. C<name> must be a C<NUL>-terminated literal string.
 #define SAVECOPLINE(c)         SAVEI32(CopLINE(c))
 
 /* SSNEW() temporarily allocates a specified number of bytes of data on the
 #define SAVECOPLINE(c)         SAVEI32(CopLINE(c))
 
 /* SSNEW() temporarily allocates a specified number of bytes of data on the
- * savestack.  It returns an integer index into the savestack, because a
+ * savestack.  It returns an I32 index into the savestack, because a
  * pointer would get broken if the savestack is moved on reallocation.
  * SSNEWa() works like SSNEW(), but also aligns the data to the specified
  * number of bytes.  MEM_ALIGNBYTES is perhaps the most useful.  The
  * pointer would get broken if the savestack is moved on reallocation.
  * SSNEWa() works like SSNEW(), but also aligns the data to the specified
  * number of bytes.  MEM_ALIGNBYTES is perhaps the most useful.  The