On Fri, Aug 02, 2002 at 08:55:21AM -0700, Sean O'Rourke wrote: > I agree -- we should separate new from init at some level. I think the > "new" opcode should still both allocate and initialize, while the > normal sequence for getting a PMC should become > > x = pmc_new(...); > x->vtable->init(interp, x); > > This would solve the continuation problem without breaking existing pasm > code. It would involve tweaking a lot of existing C, but such is life. > Any objections?
So in a loop, for a temporary, one should do this? x = pmc_new(...); while (...) { x->vtable->init(interp, x); ... } and there's only one allocation made for the loop, but a fresh temporary each time? Nicholas Clark -- Even better than the real thing: http://nms-cgi.sourceforge.net/