Author: chip
Date: Tue May 16 13:27:30 2006
New Revision: 12706

Modified:
   trunk/docs/pdds/clip/pdd02_vtables.pod
   trunk/docs/pdds/clip/pdd15_objects.pod

Changes in other areas also in this revision:
Modified:
   trunk/docs/ROADMAP.pod
   trunk/docs/vtables.pod
   trunk/src/ops/ops.num
   trunk/src/ops/pmc.ops
   trunk/src/pmc/default.pmc
   trunk/src/pmc/parrotobject.pmc
   trunk/src/pmc/ref.pmc
   trunk/src/pmc/sharedref.pmc
   trunk/t/pmc/prop.t
   trunk/vtable.tbl

Log:
DELETED: object initialization with simultaneous setting of properties, via
  the init_pmc_props() vtable method and its associated opcodes.
Documented: init_pmc() takes an arbitrary initializer with a PMC-specific
  meaning, rather than the complicated mess that had been partly documented
  but never actually used.

Modified: trunk/docs/pdds/clip/pdd02_vtables.pod
==============================================================================
--- trunk/docs/pdds/clip/pdd02_vtables.pod      (original)
+++ trunk/docs/pdds/clip/pdd02_vtables.pod      Tue May 16 13:27:30 2006
@@ -50,29 +50,11 @@
 
 =item void init_pmc(INTERP, PMC* self, PMC* initializer)
 
-This form of the init method takes a single initializer parameter. The
-initializer is an array that contains keys and values. The meaning of the keys
-and their corresponding values is left up to the PMC.
+This form of PMC initialization takes a single initializer parameter.  The
+initializer is an arbitrary PMC whose contents are interpreted by the target
+PMC in an arbitrary fashion.  Passing NULL is permitted by Parrot.
 
-Keys are either strings or integers. If strings, the PMC is responsible for
-figuring out what the string represents. If integers, it means the meaning has
-been pre-figured based on meta-information from the class.
-
-For example, if a class has the known properties "Size", "Dimension" and
-"Color", they may be assigned the values 100, 101, and 102. If the creator of
-the PMC knows enough about the class to make the translation to numbers it may;
-otherwise, the raw strings may be used. So, for the declaration:
-
-   my @foo Size(12), Dimension(3), Color("Green");
-
-the init array may be [100, 12, 101, 3, 102, "Green"] or ["Size", 12,
-"Dimension", 3, "Color", "Green"]. Note that, in all cases, the array is an
-array of PMCs. (So you get either an int PMC or a string PMC in the list of
-keys).
-
-=item void init_pmc_props(INTERP, PMC* self, PMC* initializer, PMC* properties)
-
-XXX: what does this do?
+NOTE: It is strongly suggested that init_pmc(NULL) be equivalent to init().
 
 =item void morph(INTERP, PMC* self, INTVAL type)
 

Modified: trunk/docs/pdds/clip/pdd15_objects.pod
==============================================================================
--- trunk/docs/pdds/clip/pdd15_objects.pod      (original)
+++ trunk/docs/pdds/clip/pdd15_objects.pod      Tue May 16 13:27:30 2006
@@ -539,7 +539,12 @@
 
 =item __init_pmc
 
-=item __init_pmc_props
+Alternative entry point called when object is first created.  Accepts a PMC
+parameter used to initialize the given object.  Interpretation of the PMC is
+PMC-specific.
+
+NOTE: It is strongly suggested that init_pmc(PMCNULL) be equivalent to
+init(), though there will of necessity be exceptions.
 
 =item __morph
 

Reply via email to