Mercurial > repos > tabletprog
comparison runtime/progfoot.inc @ 35:bf5e88f6419d
Use a function/method call strategy that actually works
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 09 Jul 2012 21:32:28 -0700 |
parents | 668f533e5284 |
children | e7be612fd3ae |
comparison
equal
deleted
inserted
replaced
34:a10f1b049193 | 35:bf5e88f6419d |
---|---|
1 | 1 |
2 int main(int argc, char ** argv) | 2 int main(int argc, char ** argv) |
3 { | 3 { |
4 object * params[64]; | 4 object * ret = mcall(METHOD_ID_MAIN, 1, mainModule()); |
5 params[0] = mainModule(); | |
6 object * ret = mcall(METHOD_ID_MAIN, 1, params); | |
7 printf("%p:%p\n", ret->meta, &obj_int32_meta); | |
8 if (ret->meta == &obj_int32_meta) { | 5 if (ret->meta == &obj_int32_meta) { |
9 obj_int32 * reti32 = (obj_int32 *) ret; | 6 obj_int32 * reti32 = (obj_int32 *) ret; |
10 printf("%d\n", reti32->num); | 7 printf("%d\n", reti32->num); |
11 } else if(ret->meta == &lambda_meta) { | 8 } else if(ret->meta == &lambda_meta) { |
12 puts("returned lambda????"); | 9 puts("returned lambda????"); |