Created
February 20, 2014 22:06
-
-
Save tobyink/9124283 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| dSP; | |
| int count; | |
| SV *ret; | |
| bool can; | |
| SV *method_name = newSV(0); | |
| sv_setpv(SV*, "MATCH"); | |
| ENTER; | |
| SAVETMPS; | |
| PUSHMARK(SP); | |
| XPUSHs(b); | |
| XPUSHs(method_name); | |
| PUTBACK; | |
| count = call_method("can", G_SCALAR); | |
| SPAGAIN; | |
| ret = POPs; | |
| can = SvTRUE(ret); | |
| PUTBACK; | |
| FREETMPS; | |
| LEAVE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment