diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 18:42:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 18:42:46 -0700 |
commit | 39b93880df73cb06c33d7eb393b150a7c961f4bd (patch) | |
tree | 25cd6d459e25a2c00ef3530da6fbad95fc4e82a4 /src/modules.js | |
parent | 665634f1d74ccfa143f0a56ca3715e080f48b865 (diff) |
automatic checks for missing C defines
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 5 |
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 + ' */'); +} + |