Kaos wrote:
Marcus Agehall (PacketFront) @ Pike (-) developers forum wrote:
What do you mean by "map variables"?
If you are asking how to make variables in your CMOD visible from Pike, you should use code like "PIKEVAR int x" to create an integer that is visible from Pike.
Is this only possible inside a PIKECLASS? It works there, but when I add a PIKEVAR int foo; to the main module (ends up in the _struct) i get a segfault right after the PIKE_MODULE_INIT has run.
I don't get the ADD_STORAGE( struct _struct ) I would expect, as I've seen for the classes that has these struct's added (but with their name prefixed, though). Don't I have to call ADD_STORAGE for the module's _struct? (or precompile) as is done for the classes it contains.