From 975cb9f01549595f4dd7d7166e1ca9056c22cc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 8 Nov 2024 08:56:14 +0100 Subject: [PATCH] Remove `qjs` namespace backwards compatibility Fixes: https://github.com/quickjs-ng/quickjs/issues/650 --- quickjs.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/quickjs.c b/quickjs.c index d387b178..97161cde 100644 --- a/quickjs.c +++ b/quickjs.c @@ -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); }