Created
March 23, 2013 13:40
-
-
Save arnsholt/5227768 to your computer and use it in GitHub Desktop.
Tweaked VTABLE_does
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VTABLE INTVAL does(STRING *what) { | |
PMC *decont = decontainerize(interp, SELF); | |
if (Parrot_str_equal(interp, what, CONST_STRING(interp, "invokable"))) { | |
return 1; | |
} | |
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "array"))) { | |
return Parrot_str_equal(interp, REPR(decont)->name, CONST_STRING(interp, "VMArray")); | |
} | |
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "hash"))) { | |
return Parrot_str_equal(interp, REPR(decont)->name, CONST_STRING(interp, "VMHash")); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment