Author: petdance
Date: Thu Jan 31 15:42:21 2008
New Revision: 25392

Modified:
   trunk/src/pmc.c

Log:
Doc patch from ajr.  Removed an exit point from the function so it exits at the 
bottom

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c     (original)
+++ trunk/src/pmc.c     Thu Jan 31 15:42:21 2008
@@ -471,8 +471,9 @@
 /*
 
 =item C<static PMC* create_class_pmc>
-
-RT#48260: Not yet documented!!!
+ 
+Create a class object for this interpreter.  Takes an interpreter
+name and type as arguments.  Returns a pointer to the class object.
 
 =cut
 
@@ -499,20 +500,20 @@
     if ((interp->vtables[type]->flags & VTABLE_PMC_IS_SINGLETON)
         && (_class == _class->vtable->pmc_class)) {
         interp->vtables[type]->pmc_class = _class;
-        return _class;
     }
+    else {
+        if (PObj_is_PMC_EXT_TEST(_class))
+            Parrot_free_pmc_ext(interp, _class);
 
-    if (PObj_is_PMC_EXT_TEST(_class))
-        Parrot_free_pmc_ext(interp, _class);
-
-    DOD_flag_CLEAR(is_special_PMC, _class);
+        DOD_flag_CLEAR(is_special_PMC, _class);
 
-    PMC_pmc_val(_class)    = (PMC  *)0xdeadbeef;
-    PMC_struct_val(_class) = (void *)0xdeadbeef;
+        PMC_pmc_val(_class)    = (PMC  *)0xdeadbeef;
+        PMC_struct_val(_class) = (void *)0xdeadbeef;
 
-    PObj_is_PMC_shared_CLEAR(_class);
+        PObj_is_PMC_shared_CLEAR(_class);
 
-    interp->vtables[type]->pmc_class = _class;
+        interp->vtables[type]->pmc_class = _class;
+    }
 
     return _class;
 }

Reply via email to