Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created June 1, 2012 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/2855195 to your computer and use it in GitHub Desktop.
Save jnthn/2855195 to your computer and use it in GitHub Desktop.
diff --git a/src/pmc/qrpa.pmc b/src/pmc/qrpa.pmc
index 9aa98d3..77483a5 100644
--- a/src/pmc/qrpa.pmc
+++ b/src/pmc/qrpa.pmc
@@ -206,11 +206,11 @@ Resizes the array to C<n> elements.
VTABLE PMC * get_pmc_keyed_int(INTVAL pos) {
- INTVAL elems;
- INTVAL start;
- PMC **slots;
+ Parrot_QRPA_attributes *attrs = PARROT_QRPA(SELF);
+ INTVAL elems = attrs->elems;
+ INTVAL start = attrs->start;
+ PMC **slots = attrs->slots;
- GET_ATTR_elems(INTERP, SELF, elems);
if (pos < 0)
pos += elems;
@@ -221,8 +221,6 @@ Resizes the array to C<n> elements.
if (pos >= elems)
return PMCNULL;
- GET_ATTR_start(INTERP, SELF, start);
- GET_ATTR_slots(INTERP, SELF, slots);
return slots[start + pos];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment