[svn:parrot] r38731 - trunk/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Wed May 13 00:48:00 UTC 2009


Author: whiteknight
Date: Wed May 13 00:47:59 2009
New Revision: 38731
URL: https://trac.parrot.org/parrot/changeset/38731

Log:
[docs] add lots more function-level documentation for places in src/* that needed it

Modified:
   trunk/src/pmc.c
   trunk/src/utils.c

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Wed May 13 00:29:26 2009	(r38730)
+++ trunk/src/pmc.c	Wed May 13 00:47:59 2009	(r38731)
@@ -213,7 +213,9 @@
 =item C<static PMC * get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL
 flags)>
 
-Gets a new PMC header.
+Gets a new PMC header of the given integer type. Initialize the pmc if
+necessary. In the case of singleton PMC types, get the existing singleton
+instead of allocating a new one.
 
 =cut
 
@@ -483,6 +485,11 @@
 
 =item C<static void pmc_free(PARROT_INTERP, PMC *pmc)>
 
+Free the given PMC. This function does not call the custom destroy VTABLE if
+one is specified for PMCs of that type (should it?).
+
+TT #663: As of r38727, this function is not called from anywhere
+
 =cut
 
 */
@@ -499,6 +506,9 @@
 
 =item C<INTVAL get_new_vtable_index(PARROT_INTERP)>
 
+Get a new unique identifier number and allocate a new vtable structure for a
+new PMC type.
+
 =cut
 
 */

Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c	Wed May 13 00:29:26 2009	(r38730)
+++ trunk/src/utils.c	Wed May 13 00:47:59 2009	(r38731)
@@ -892,6 +892,9 @@
 
 =item C<static INTVAL COMPARE(PARROT_INTERP, void *a, void *b, PMC *cmp)>
 
+General PMC comparison function. Takes two PMCs. Returns 0 if they are equal,
+returns 1 if C<a> is bigger, and returns -1 if C<b> is bigger.
+
 =cut
 
 */
@@ -918,6 +921,8 @@
 
 =item C<void Parrot_quicksort(PARROT_INTERP, void **data, UINTVAL n, PMC *cmp)>
 
+Perform a quicksort on a PMC array.
+
 =cut
 
 */


More information about the parrot-commits mailing list