[svn:parrot] r44415 - trunk/src/pmc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Feb 23 22:19:07 UTC 2010
Author: chromatic
Date: Tue Feb 23 22:19:06 2010
New Revision: 44415
URL: https://trac.parrot.org/parrot/changeset/44415
Log:
[PMC] Fixed compiler warnings in OpLib's get_pmc_keyed_int().
Modified:
trunk/src/pmc/oplib.pmc
Modified: trunk/src/pmc/oplib.pmc
==============================================================================
--- trunk/src/pmc/oplib.pmc Tue Feb 23 22:19:03 2010 (r44414)
+++ trunk/src/pmc/oplib.pmc Tue Feb 23 22:19:06 2010 (r44415)
@@ -8,7 +8,7 @@
=head1 DESCRIPTION
-Implements oplib VTABLEs.
+Implements oplib VTABLEs.
=cut
@@ -82,13 +82,12 @@
}
VTABLE PMC* get_pmc_keyed_int(INTVAL value) {
- if (value > interp->op_lib->op_count)
+ if ((UINTVAL)value > interp->op_lib->op_count)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"OpLib: Opcode index %d out of bounds", value);
else {
- const char * const name = interp->op_info_table[value].full_name;
- const INTVAL len = strlen(name);
- STRING * const newstr = Parrot_str_new(INTERP, name, len);
+ const char * const name = interp->op_info_table[value].full_name;
+ STRING * const newstr = Parrot_str_new(INTERP, name, 0);
return VTABLE_get_pmc_keyed_str(INTERP, SELF, newstr);
}
}
More information about the parrot-commits
mailing list