Created
June 29, 2011 01:32
-
-
Save Whiteknight/1052714 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
function main[main]() | |
{ | |
var curpf = getinterp()["packfile"]; | |
var all_subs = curpf.all_subs(); | |
for (var sub in all_subs) | |
say(sub); | |
all_subs[2](); | |
all_subs[3](); | |
} | |
function foo() { | |
say("in foo!"); | |
} | |
function bar() { | |
say("in bar!"); | |
} |
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
function main[main]() | |
{ | |
var curpf = getinterp()["packfile"]; | |
var counts = curpf.constant_counts(); | |
int pmc_count = counts[2]; | |
say("PMC Constants"); | |
for (int i = 0; i < pmc_count; i++) { | |
var c = curpf[i]; | |
say(sprintf("\t%d: %s", [i, typeof(c)])); | |
} | |
int str_count = counts[1]; | |
say("String Constants"); | |
for (int i = 0; i < str_count; i++) { | |
string c = curpf[i]; | |
say(sprintf("\t%d: '%s'", [i, c])); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment