1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-14 22:37:12 +00:00

Fix funcdef flags when marshaling.

This commit is contained in:
Calvin Rose
2018-08-21 15:07:37 -04:00
parent 600292fad4
commit 634ec85b07
8 changed files with 19 additions and 25 deletions

View File

@@ -95,15 +95,6 @@ int32_t dst_tablen(int32_t n) {
return n + 1;
}
/* Add function flags to dst functions */
void dst_func_addflags(DstFuncDef *def) {
if (def->name) def->flags |= DST_FUNCDEF_FLAG_HASNAME;
if (def->source) def->flags |= DST_FUNCDEF_FLAG_HASSOURCE;
if (def->defs) def->flags |= DST_FUNCDEF_FLAG_HASDEFS;
if (def->environments) def->flags |= DST_FUNCDEF_FLAG_HASENVS;
if (def->sourcemap) def->flags |= DST_FUNCDEF_FLAG_HASSOURCEMAP;
}
/* Compare a dst string with a cstring. more efficient than loading
* c string as a dst string. */
int dst_cstrcmp(const uint8_t *str, const char *other) {