Author: leo
Date: Tue Mar 21 07:19:20 2006
New Revision: 11963
Modified:
trunk/src/pmc/nci.pmc
trunk/src/pmc/sub.pmc
Log:
add introspection method get_multisig
Modified: trunk/src/pmc/nci.pmc
==============================================================================
--- trunk/src/pmc/nci.pmc (original)
+++ trunk/src/pmc/nci.pmc Tue Mar 21 07:19:20 2006
@@ -28,6 +28,20 @@
/*
+=item C<METHOD PMC* get_multisig()>
+
+Return the MMD signature PMC, if any or a Null PMC.
+
+=cut
+
+*/
+
+ METHOD PMC* get_multisig() {
+ return PMC_pmc_val(SELF) ? PMC_pmc_val(SELF) : PMCNULL;
+ }
+
+/*
+
=item C<void init()>
Initializes the NCI with a C<NULL> function pointer.
Modified: trunk/src/pmc/sub.pmc
==============================================================================
--- trunk/src/pmc/sub.pmc (original)
+++ trunk/src/pmc/sub.pmc Tue Mar 21 07:19:20 2006
@@ -525,6 +525,10 @@
Return the LexInfo PMC, if any or a Null PMC.
+=item C<METHOD PMC* get_multisig()>
+
+Return the MMD signature PMC, if any or a Null PMC.
+
=cut
*/
@@ -565,6 +569,10 @@
return sub->outer_sub ? sub->outer_sub : PMCNULL;
}
+ METHOD PMC* get_multisig() {
+ struct Parrot_sub * sub = PMC_sub(SELF);
+ return sub->multi_signature ? sub->multi_signature : PMCNULL;
+ }
}
/*