Created
August 24, 2008 22:51
-
-
Save tokuhirom/7013 to your computer and use it in GitHub Desktop.
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
=== MOP.xs | |
================================================================== | |
--- MOP.xs (revision 22684) | |
+++ MOP.xs (local) | |
@@ -127,10 +127,11 @@ | |
/* BAH! constants are horrible */ | |
key = HePV(he, keylen); | |
fqlen = pkglen + keylen + 3; | |
- fq = (char *)alloca(fqlen); | |
- snprintf(fq, fqlen, "%s::%s", package, key); | |
+ Newx(fq, fqlen, char); | |
+ sprintf(fq, "%s::%s", package, key); | |
sv = (SV*)get_cv(fq, 0); | |
sv_2mortal(sv); | |
+ Safefree(fq); | |
break; | |
default: | |
continue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment