diff options
| author | 2021-07-27 19:19:39 -0600 | |
|---|---|---|
| committer | 2021-07-27 19:19:39 -0600 | |
| commit | 1c7505e04a80934ea39bcd200309d91c2d7ede4f (patch) | |
| tree | 8197b606a45665280ae41341d6d605bab6269566 /src/include/janet.h | |
| parent | Add JANET_DEF and co, use in math.c (diff) | |
| parent | Merge pull request #726 from yumaikas/new-style-ev-bindings (diff) | |
Merge branch 'master' into new-style-math-bindings
Diffstat (limited to 'src/include/janet.h')
| -rw-r--r-- | src/include/janet.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/include/janet.h b/src/include/janet.h index 6799aef7..5d8f6913 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -1765,7 +1765,7 @@ JANET_API Janet janet_resolve_core(const char *name); /* no docstrings or sourcemaps */ #define JANET_REG_(JNAME, CNAME) {JNAME, CNAME, NULL, NULL, 0} #define JANET_FN_(CNAME, USAGE, DOCSTRING) \ - static Janet CNAME (int32_t argc, Janet *argv) + Janet CNAME (int32_t argc, Janet *argv) #define JANET_DEF_(ENV, JNAME, VAL, DOC) \ janet_def(ENV, JNAME, VAL, NULL) @@ -1773,7 +1773,7 @@ JANET_API Janet janet_resolve_core(const char *name); #define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_} #define JANET_FN_S(CNAME, USAGE, DOCSTRING) \ static int32_t CNAME##_sourceline_ = __LINE__; \ - static Janet CNAME (int32_t argc, Janet *argv) + Janet CNAME (int32_t argc, Janet *argv) #define JANET_DEF_S(ENV, JNAME, VAL, DOC) \ janet_def_sm(ENV, JNAME, VAL, NULL, __FILE__, __LINE__) @@ -1781,7 +1781,7 @@ JANET_API Janet janet_resolve_core(const char *name); #define JANET_REG_D(JNAME, CNAME) {JNAME, CNAME, CNAME##_docstring_, NULL, 0} #define JANET_FN_D(CNAME, USAGE, DOCSTRING) \ static const char CNAME##_docstring_[] = USAGE "\n\n" DOCSTRING; \ - static Janet CNAME (int32_t argc, Janet *argv) + Janet CNAME (int32_t argc, Janet *argv) #define JANET_DEF_D(ENV, JNAME, VAL, DOC) \ janet_def(ENV, JNAME, VAL, DOC) @@ -1790,10 +1790,11 @@ JANET_API Janet janet_resolve_core(const char *name); #define JANET_FN_SD(CNAME, USAGE, DOCSTRING) \ static int32_t CNAME##_sourceline_ = __LINE__; \ static const char CNAME##_docstring_[] = USAGE "\n\n" DOCSTRING; \ - static Janet CNAME (int32_t argc, Janet *argv) + Janet CNAME (int32_t argc, Janet *argv) #define JANET_DEF_SD(ENV, JNAME, VAL, DOC) \ janet_def_sm(ENV, JNAME, VAL, DOC, __FILE__, __LINE__) + /* Choose defaults for source mapping and docstring based on config defs */ #if defined(JANET_NO_SOURCEMAPS) && defined(JANET_NO_DOCSTRINGS) #define JANET_REG JANET_REG_ |
