aboutsummaryrefslogtreecommitdiff
path: root/src/modules.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-25 18:42:46 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-25 18:42:46 -0700
commit39b93880df73cb06c33d7eb393b150a7c961f4bd (patch)
tree25cd6d459e25a2c00ef3530da6fbad95fc4e82a4 /src/modules.js
parent665634f1d74ccfa143f0a56ca3715e080f48b865 (diff)
automatic checks for missing C defines
Diffstat (limited to 'src/modules.js')
-rw-r--r--src/modules.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules.js b/src/modules.js
index 20f42f97..a4a64790 100644
--- a/src/modules.js
+++ b/src/modules.js
@@ -281,3 +281,8 @@ var LibraryManager = {
}
};
+// Safe way to access a C define. We check that we don't add library functions with missing defines.
+function cDefine(key) {
+ return key in C_DEFINES ? C_DEFINES[key] : ('0 /* XXX missing C define ' + key + ' */');
+}
+