Mercurial > repos > tabletprog
view 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 |
line wrap: on
line source
int main(int argc, char ** argv) { object * ret = mcall(METHOD_ID_MAIN, 1, mainModule()); if (ret->meta == &obj_int32_meta) { obj_int32 * reti32 = (obj_int32 *) ret; printf("%d\n", reti32->num); } else if(ret->meta == &lambda_meta) { puts("returned lambda????"); } else { int i = 0; for(; i < 16; ++i) { if (ret->meta->meth_lookup[i] != &no_impl) { printf("slot %d is set\n", i); } } } return 0; }