File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,29 @@ if [ $NJS_TRY_QUICKJS = YES ]; then
137
137
138
138
. auto/feature
139
139
140
+ njs_feature="QuickJS JS_AddIntrinsicBigInt()"
141
+ njs_feature_name=NJS_HAVE_QUICKJS_ADD_INTRINSIC_BIG_INT
142
+ njs_feature_test="#if defined(__GNUC__) && (__GNUC__ >= 8)
143
+ #pragma GCC diagnostic push
144
+ #pragma GCC diagnostic ignored \"-Wcast-function-type\"
145
+ #endif
146
+
147
+ #include <quickjs.h>
148
+
149
+ int main() {
150
+ JSRuntime *rt;
151
+ JSContext *ctx;
152
+
153
+ rt = JS_NewRuntime();
154
+ ctx = JS_NewContextRaw(rt);
155
+ JS_AddIntrinsicBigInt(ctx);
156
+ JS_FreeContext(ctx);
157
+ JS_FreeRuntime(rt);
158
+ return 0;
159
+ }"
160
+
161
+ . auto/feature
162
+
140
163
njs_feature="QuickJS version"
141
164
njs_feature_name=NJS_QUICKJS_VERSION
142
165
njs_feature_run=value
Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ qjs_new_context(JSRuntime *rt, qjs_module_t **addons)
165
165
JS_AddIntrinsicMapSet (ctx );
166
166
JS_AddIntrinsicTypedArrays (ctx );
167
167
JS_AddIntrinsicPromise (ctx );
168
+ #ifdef NJS_HAVE_QUICKJS_ADD_INTRINSIC_BIG_INT
168
169
JS_AddIntrinsicBigInt (ctx );
170
+ #endif
169
171
JS_AddIntrinsicEval (ctx );
170
172
171
173
for (module = qjs_modules ; * module != NULL ; module ++ ) {
You can’t perform that action at this time.
0 commit comments