hi,
I need to create an instance of a class on C-level. I assume I have to allocate memory for the data used by the object. Do I do that directly or are there any macros/functions thath I ought to use. Another problem is that the class that I want to instantiate doesn't contain any data itself (only functions), but one of the classes it inherits does have data; how do I link this?
- Sebastian
Actually, you don't do much at all yourself. Push the arguments on the stack and call clone_object with the program.
push_int(7); obj = clone_object(program, 1); /* 1==number of args */
pike-devel@lists.lysator.liu.se