aboutsummaryrefslogtreecommitdiff
path: root/emlink.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-30 09:46:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:04 -0700
commit2c44a12bc755e4b59619a18027ab5b1a0752e0f1 (patch)
treee28255f759aa47035e36474cde8bc2748384bcb1 /emlink.py
parent1d043dddf1d99cffde43bf7005175c55771d73e8 (diff)
docs
Diffstat (limited to 'emlink.py')
-rw-r--r--emlink.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/emlink.py b/emlink.py
index 8270291a..a2c02fdb 100644
--- a/emlink.py
+++ b/emlink.py
@@ -15,8 +15,13 @@ Limitations:
* Modules cannot be minified (but can be minified after linking)
* We duplicate code in some cases, like overlapping names in different modules, and function aliases
- * We do not handle sharing of global constants across modules, only code (you can make a function to
- access a constant, if you need that)
+ * We only share code between modules, not global variables. Global variables should be declared
+ in the module that uses them, other modules can reach them through function calls. For example,
+ a static class function implemented in one module can be called from another, and it can provide
+ access to static variables on that class. (Note that implementing the static class function in a
+ header will not work, then the code will be duplicated in each module, with only one of them
+ able to correctly access the variable - the one in the same module as where the variable is
+ declared.)
* We do not link in compiled libraries (libc, libc++, etc.) in side modules. If the main module
does not automatically link in the ones that side modules will need, you should compile the
main module with