[svn:parrot] r38082 - branches/packfile_revamp/src/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Apr 12 09:53:53 UTC 2009
Author: bacek
Date: Sun Apr 12 09:53:52 2009
New Revision: 38082
URL: https://trac.parrot.org/parrot/changeset/38082
Log:
Small changes to PackfileAnnotationKeys.
* Add get_constant_table method for testing purpose.
* Rename set_const_table to get_constant_table for consistency sake.
Modified:
branches/packfile_revamp/src/pmc/packfileannotationkeys.pmc
Modified: branches/packfile_revamp/src/pmc/packfileannotationkeys.pmc
==============================================================================
--- branches/packfile_revamp/src/pmc/packfileannotationkeys.pmc Sun Apr 12 09:53:35 2009 (r38081)
+++ branches/packfile_revamp/src/pmc/packfileannotationkeys.pmc Sun Apr 12 09:53:52 2009 (r38082)
@@ -181,19 +181,6 @@
/*
-=item C<void set_const_table(PMC *table)>
-
-Set PackfileConstantTable used for Key names lookup.
-
-=cut
-
-*/
- METHOD set_const_table(PMC *table) {
- PARROT_PACKFILEANNOTATIONKEYS(SELF)->const_table = table;
- }
-
-/*
-
=item C<void set_pointer()>
Initialize from PackFile_Annotation pointer.
@@ -215,6 +202,35 @@
}
}
+/*
+
+=item C<void set_constant_table()>
+
+Set PackfileConstantTable associated with Keys.
+
+=cut
+
+*/
+ METHOD set_constant_table(PMC *table) {
+ PARROT_PACKFILEANNOTATIONKEYS(SELF)->const_table = table;
+ }
+
+/*
+
+=item C<void get_constant_table()>
+
+Get PackfileConstantTable associated with PackfileAnnotationKeys.
+Solely for testing purpose only.
+
+=cut
+
+*/
+ METHOD get_constant_table() {
+ PMC * table = PARROT_PACKFILEANNOTATIONKEYS(SELF)->const_table;
+ if (!table)
+ table = PMCNULL;
+ RETURN(PMC* table);
+ }
}
/*
More information about the parrot-commits
mailing list