Front page | perl.cvs.parrot |
Postings from December 2008
[svn:parrot] r34697 - in trunk: docs/pdds src/pmc
From:
bernhard
Date:
December 31, 2008 03:57
Subject:
[svn:parrot] r34697 - in trunk: docs/pdds src/pmc
Message ID:
20081231115659.76DBACBA08@x12.develooper.com
Author: bernhard
Date: Wed Dec 31 03:56:58 2008
New Revision: 34697
Modified:
trunk/src/pmc/class.pmc
Changes in other areas also in this revision:
Modified:
trunk/docs/pdds/pdd27_multiple_dispatch.pod
Log:
Some tidbits: speling, code alignment, add code comments
Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc (original)
+++ trunk/src/pmc/class.pmc Wed Dec 31 03:56:58 2008
@@ -123,13 +123,13 @@
if (PObj_is_class_TEST(cur_class)) {
/* The attribute metadata hash. */
Parrot_Class_attributes * const class_info = PARROT_CLASS(cur_class);
- PMC * const attribs = class_info->attrib_metadata;
- PMC * const iter = VTABLE_get_iter(interp, attribs);
+ PMC * const attribs = class_info->attrib_metadata;
+ PMC * const iter = VTABLE_get_iter(interp, attribs);
/* Build a string representing the fully qualified class name. */
/* Retrieve the fully qualified class name for the class. */
- STRING * const fq_class = VTABLE_get_string(interp, cur_class);
- PMC * const class_cache = pmc_new(interp, enum_class_Hash);
+ STRING * const fq_class = VTABLE_get_string(interp, cur_class);
+ PMC * const class_cache = pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, cache, fq_class, class_cache);
/* Iterate over the attributes. */
@@ -443,9 +443,9 @@
=item C<void init_pmc(PMC *init_data)>
-The actual class creation code, called from C<newclass> opcode. The C<init>
-argument may either be the name of the class, or a hash of initialization
-arguments. The class is attatched to the current HLL namespace.
+The actual class creation code, called from C<newclass> opcode. The C<init_data>
+argument may be either the name of the class or a hash of initialization
+arguments. The class is attached to the current HLL namespace.
=cut
@@ -499,6 +499,7 @@
case enum_class_Key:
case enum_class_ResizableStringArray:
case enum_class_NameSpace:
+ /* set only the name property */
arg = pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
break;
@@ -512,6 +513,7 @@
if (VTABLE_isa(interp, init_data, CONST_STRING(interp, "String"))
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "Key"))
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "ResizableStringArray"))) {
+ /* set only the name property */
arg = pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
}
@@ -1048,10 +1050,10 @@
VTABLE PMC *instantiate(PMC *init) {
Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
- STRING * const class_str = CONST_STRING(interp, "Class");
+ STRING * const class_str = CONST_STRING(interp, "Class");
Parrot_Object_attributes *obj_guts;
- PMC *object;
+ PMC *object;
/* If we've not been instantiated before... */
if (!_class->instantiated) {
@@ -1508,7 +1510,7 @@
=item C<void name(STRING *name :optional, int has_name :opt_flag)>
-Sets the name of the class, and updates the namespace accoringly.
+Sets the name of the class, and updates the namespace accordingly.
=cut
-
[svn:parrot] r34697 - in trunk: docs/pdds src/pmc
by bernhard