What's the best way to rename Module?

290 views
Skip to first unread message

Philip Rideout

unread,
Feb 9, 2015, 7:03:52 PM2/9/15
to emscripte...@googlegroups.com
I can easily create an alias to "Module", but I'd like to delete the Module variable outright, which doesn't work because it refers to itself by name.  Is there an emcc argument for this that I'm missing?

Alon Zakai

unread,
Feb 9, 2015, 10:41:52 PM2/9/15
to emscripte...@googlegroups.com
Depends what you mean by deleting the variable. On incoming, you can use MODULARIZE to wrap all the code in a function, so the only thing left on the global scope is a single variable, which by default is called Module but you can rename with EXPORT_NAME. You can also use EXPORT_NAME by itself to rename Module.

- Alon


On Mon, Feb 9, 2015 at 4:03 PM, Philip Rideout <phi...@napofearth.com> wrote:
I can easily create an alias to "Module", but I'd like to delete the Module variable outright, which doesn't work because it refers to itself by name.  Is there an emcc argument for this that I'm missing?

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philip Rideout

unread,
Feb 9, 2015, 11:11:34 PM2/9/15
to emscripte...@googlegroups.com
This sounds perfect, thanks so much!

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/zQmetwOH6h4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages