Guest User

Untitled

a guest
Oct 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. VTABLE PMC * get_pmc_keyed_int(INTVAL pos) {
  2. Parrot_QRPA_attributes *qrpa = PARROT_QRPA(SELF);
  3. INTVAL elems = qrpa->elems;
  4.  
  5. if (pos < 0)
  6. pos += elems;
  7.  
  8. if (pos < 0)
  9. Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
  10. "QRPA: index out of bounds");
  11.  
  12. if (pos >= elems)
  13. return PMCNULL;
  14.  
  15. return qrpa->slots[pos];
  16. }
Add Comment
Please, Sign In to add comment