1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Philip Taron <philip.taron@gmail.com>
3Date: Thu, 29 May 2025 17:16:43 -0700
4Subject: [PATCH] Update for QuickJS 2025-04-26 release
5
6Signed-off-by: Philip Taron <philip.taron@gmail.com>
7---
8 setup.py | 6 +++---
9 test_quickjs.py | 6 +++---
10 2 files changed, 6 insertions(+), 6 deletions(-)
11
12diff --git a/setup.py b/setup.py
13index 9d17af357dcadc40478789ef9c82ac82632967d3..d0b4ff2bd7f3450f6f055ee9e2eda6b591d70689 100644
14--- a/setup.py
15+++ b/setup.py
16@@ -16,7 +16,7 @@ if sys.platform == "win32":
17 # system PATH when compiling.
18 # 3. The code below will moneky-patch distutils to work.
19 import distutils.cygwinccompiler
20- distutils.cygwinccompiler.get_msvcr = lambda: []
21+ distutils.cygwinccompiler.get_msvcr = lambda: []
22 # Make sure that pthreads is linked statically, otherwise we run into problems
23 # on computers where it is not installed.
24 extra_link_args = ["-static"]
25@@ -26,7 +26,7 @@ def get_c_sources(include_headers=False):
26 sources = [
27 "module.c",
28 "upstream-quickjs/cutils.c",
29- "upstream-quickjs/libbf.c",
30+ "upstream-quickjs/dtoa.c",
31 "upstream-quickjs/libregexp.c",
32 "upstream-quickjs/libunicode.c",
33 "upstream-quickjs/quickjs.c",
34@@ -34,7 +34,7 @@ def get_c_sources(include_headers=False):
35 if include_headers:
36 sources += [
37 "upstream-quickjs/cutils.h",
38- "upstream-quickjs/libbf.h",
39+ "upstream-quickjs/dtoa.h",
40 "upstream-quickjs/libregexp-opcode.h",
41 "upstream-quickjs/libregexp.h",
42 "upstream-quickjs/libunicode-table.h",
43diff --git a/test_quickjs.py b/test_quickjs.py
44index 1f6dec7ccd15092e98e80a9139ae2acff359b010..9444234655fba9d932ce92c82b9d8da8fe83ad5b 100644
45--- a/test_quickjs.py
46+++ b/test_quickjs.py
47@@ -105,8 +105,8 @@ class Context(unittest.TestCase):
48 else:
49 self.fail("Expected exception.")
50
51- self.assertIn("at funcA (<input>:3)\n", msg)
52- self.assertIn("at funcB (<input>:6)\n", msg)
53+ self.assertIn("at funcA (<input>:3:24)\n", msg)
54+ self.assertIn("at funcB (<input>:6:26)\n", msg)
55
56 def test_memory_limit(self):
57 code = """
58@@ -508,7 +508,7 @@ class FunctionTest(unittest.TestCase):
59 """)
60
61 self.assertEqual(f(100), 100)
62- limit = 500
63+ limit = 1500
64 with self.assertRaises(quickjs.StackOverflow):
65 f(limit)
66 f.set_max_stack_size(2000 * limit)