changed tcc_get_symbol() prototype

This commit is contained in:
bellard
2003-07-20 19:19:58 +00:00
parent c5959b77b4
commit f8d0241764
4 changed files with 24 additions and 12 deletions

View File

@ -35,7 +35,8 @@ int main(int argc, char **argv)
{
TCCState *s;
int (*func)(int);
unsigned long val;
s = tcc_new();
if (!s) {
fprintf(stderr, "Could not create tcc state\n");
@ -54,8 +55,9 @@ int main(int argc, char **argv)
tcc_relocate(s);
func = tcc_get_symbol(s, "foo");
tcc_get_symbol(s, &val, "foo");
func = (void *)val;
func(32);
tcc_delete(s);