[svn:parrot] r48262 - branches/gsoc_instrument/src/dynpmc
khairul at svn.parrot.org
khairul at svn.parrot.org
Tue Aug 3 03:11:58 UTC 2010
Author: khairul
Date: Tue Aug 3 03:11:58 2010
New Revision: 48262
URL: https://trac.parrot.org/parrot/changeset/48262
Log:
Updated get_hook_list to return a STRING* instead.
Modified:
branches/gsoc_instrument/src/dynpmc/instrumentstubbase.pmc
Modified: branches/gsoc_instrument/src/dynpmc/instrumentstubbase.pmc
==============================================================================
--- branches/gsoc_instrument/src/dynpmc/instrumentstubbase.pmc Tue Aug 3 03:10:21 2010 (r48261)
+++ branches/gsoc_instrument/src/dynpmc/instrumentstubbase.pmc Tue Aug 3 03:11:58 2010 (r48262)
@@ -159,7 +159,7 @@
func = (size_t *) parrot_hash_get(INTERP, attr->name_stubs, item);
if (entry == NULL || func == NULL) {
Parrot_ex_throw_from_c_args(INTERP, NULL, 1,
- "%Ss : c Unknown function, '%Ss'",
+ "%Ss : Unknown function, '%Ss'",
VTABLE_name(INTERP, SELF), item);
}
*entry = func;
@@ -246,7 +246,7 @@
check = (size_t *) parrot_hash_get(INTERP, attr->name_stubs, name);
if (check == NULL) {
Parrot_ex_throw_from_c_args(INTERP, NULL, 1,
- "%Ss : a Unknown function, '%Ss'",
+ "%Ss : Unknown function, '%Ss'",
VTABLE_name(INTERP, SELF), name);
}
@@ -262,10 +262,9 @@
/*
-=item C<PMC* get_hook_group(STRING *name)>
+=item C<STRING* get_hook_group(STRING *name)>
-Returns a ResizableStringArray PMC filled with
-the names of the groups that the entry given by name belongs to.
+Returns the name of the groups that the entry given by name belongs to.
=cut
@@ -273,18 +272,17 @@
METHOD get_hook_group(STRING *name) {
Parrot_InstrumentStubBase_attributes * const attr = PARROT_INSTRUMENTSTUBBASE(SELF);
- PMC *groups;
+ STRING *group;
- groups = (PMC *) parrot_hash_get(INTERP, attr->item_groups, name);
- if(PMC_IS_NULL(groups)) {
+ group = (STRING *) parrot_hash_get(INTERP, attr->item_groups, name);
+ if(STRING_IS_NULL(group)) {
/* Should not happen. All items should have a group mapping. */
Parrot_ex_throw_from_c_args(INTERP, NULL, 1,
- "%Ss : b Unknown function, '%Ss'",
+ "%Ss : a Unknown function, '%Ss'",
VTABLE_name(INTERP, SELF), name);
}
- groups = VTABLE_clone(INTERP, groups);
- RETURN(PMC *groups);
+ RETURN(STRING *group);
}
/*
More information about the parrot-commits
mailing list