Author: jonathan
Date: Sat Apr 14 08:07:56 2007
New Revision: 18195
Modified:
trunk/src/pmc/class.pmc
trunk/src/pmc/role.pmc
Log:
[PDD15]: Implement inspect PCCMETHOD for both Class and Role PMCs.
Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc (original)
+++ trunk/src/pmc/class.pmc Sat Apr 14 08:07:56 2007
@@ -854,6 +854,28 @@
/*
+=item C<void inspect(STRING *what :optional)>
+
+Gets all introspection data for the class or, if the optional string
+parameter is supplied, a particular item of introspection data.
+
+=cut
+
+*/
+ PCCMETHOD void inspect(STRING *what :optional, int got_what :opt_flag) {
+ PMC *found;
+
+ /* Just delegate to the appropriate vtable method. */
+ if (got_what)
+ found = VTABLE_inspect_str(interp, SELF, what);
+ else
+ found = VTABLE_inspect(interp, SELF);
+
+ PCCRETURN(PMC *found);
+ }
+
+/*
+
=item C<void _get_attrib_index()>
This finds the index of an attribute in an object's attribute store and
Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc (original)
+++ trunk/src/pmc/role.pmc Sat Apr 14 08:07:56 2007
@@ -546,6 +546,28 @@
role_info->methods, role_info->roles);
}
+/*
+
+=item C<void inspect(STRING *what :optional)>
+
+Gets all introspection data for the role or, if the optional string
+parameter is supplied, a particular item of introspection data.
+
+=cut
+
+*/
+ PCCMETHOD void inspect(STRING *what :optional, int got_what :opt_flag) {
+ PMC *found;
+
+ /* Just delegate to the appropriate vtable method. */
+ if (got_what)
+ found = VTABLE_inspect_str(interp, SELF, what);
+ else
+ found = VTABLE_inspect(interp, SELF);
+
+ PCCRETURN(PMC *found);
+ }
+
} /* end pmclass Role */