1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-06 10:33:03 +00:00

Be more complete with JANET_NO_SOURCEMAPS

This actually removed sourcemaps, not just
the top level annotation in bindings.
This commit is contained in:
Calvin Rose
2019-06-20 11:52:43 -04:00
parent cf05ff610f
commit 4b4fe80404
3 changed files with 9 additions and 3 deletions

View File

@@ -629,7 +629,7 @@ JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) {
}
memcpy(def->bytecode, c->buffer + scope->bytecode_start, s);
janet_v__cnt(c->buffer) = scope->bytecode_start;
if (NULL != c->mapbuffer) {
if (NULL != c->mapbuffer && c->source) {
size_t s = sizeof(JanetSourceMapping) * def->bytecode_length;
def->sourcemap = malloc(s);
if (NULL == def->sourcemap) {