Skip to content

Commit

Permalink
Remove qjs namespace backwards compatibility
Browse files Browse the repository at this point in the history
Fixes: #650
  • Loading branch information
saghul committed Nov 8, 2024
1 parent 43151dd commit d7c5c7c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26306,16 +26306,6 @@ static char *js_default_module_normalize_name(JSContext *ctx,
int len;

if (name[0] != '.') {
/* Backwards compatibility for stdlib rename. */
static const char names[] = "qjs:bjson\0qjs:std\0qjs:os";
for (const char *p = names; p < endof(names); p += 1 + strlen(p)) {
if (!strcmp(name, p+4)) {
#ifndef NDEBUG
printf("WARN: Standard library modules should be prefixed with `qjs:`. Example: %s\n", p);
#endif
return js_strdup(ctx, p);
}
}
/* if no initial dot, the module name is not modified */
return js_strdup(ctx, name);
}
Expand Down

0 comments on commit d7c5c7c

Please sign in to comment.