Mercurial > repos > tabletprog
comparison runtime/object.c @ 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 | a10f1b049193 |
children | 2a9c6eed0c70 |
comparison
equal
deleted
inserted
replaced
34:a10f1b049193 | 35:bf5e88f6419d |
---|---|
28 ret->header.parent = NULL; | 28 ret->header.parent = NULL; |
29 ret->env = env; | 29 ret->env = env; |
30 ret->func = func; | 30 ret->func = func; |
31 return (object *) ret; | 31 return (object *) ret; |
32 } | 32 } |
33 | |
34 object * mcall(uint32_t method_id, uint32_t num_args, object * self, ...) | |
35 { | |
36 va_list args; | |
37 va_start(args, self); | |
38 object * ret = self->meta->meth_lookup[method_id & 0xF](method_id, num_args, self, args); | |
39 va_end(args); | |
40 return ret; | |
41 } |