omdev-cext 0.0.52__tar.gz → 0.0.53__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {omdev_cext-0.0.52/omdev_cext.egg-info → omdev_cext-0.0.53}/PKG-INFO +2 -2
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libunicode.c +5 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs-libc.c +22 -3
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs.c +103 -76
- {omdev_cext-0.0.52 → omdev_cext-0.0.53/omdev_cext.egg-info}/PKG-INFO +2 -2
- omdev_cext-0.0.53/omdev_cext.egg-info/requires.txt +1 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/pyproject.toml +2 -2
- omdev_cext-0.0.52/omdev_cext.egg-info/requires.txt +0 -1
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/LICENSE +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/MANIFEST.in +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/README.md +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_pyqjsng.c +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/builtin-array-fromasync.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/builtin-iterator-zip-keyed.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/builtin-iterator-zip.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/cutils.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/dtoa.c +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/dtoa.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libregexp-opcode.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libregexp.c +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libregexp.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libunicode-table.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/libunicode.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/list.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs-atom.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs-c-atomics.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs-libc.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs-opcode.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/quickjs.h +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev_cext.egg-info/SOURCES.txt +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev_cext.egg-info/dependency_links.txt +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev_cext.egg-info/top_level.txt +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/setup.cfg +0 -0
- {omdev_cext-0.0.52 → omdev_cext-0.0.53}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omdev-cext
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.53
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.15
|
|
|
14
14
|
Requires-Python: >=3.14
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: omdev==0.0.
|
|
17
|
+
Requires-Dist: omdev==0.0.53
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
20
|
# Overview
|
|
@@ -1053,6 +1053,11 @@ int unicode_normalize(uint32_t **pdst, const uint32_t *src, int src_len,
|
|
|
1053
1053
|
int *buf, buf_len, i, p, starter_pos, cc, last_cc, out_len;
|
|
1054
1054
|
bool is_compat;
|
|
1055
1055
|
DynBuf dbuf_s, *dbuf = &dbuf_s;
|
|
1056
|
+
|
|
1057
|
+
if (src_len == 0) {
|
|
1058
|
+
*pdst = NULL;
|
|
1059
|
+
return 0;
|
|
1060
|
+
}
|
|
1056
1061
|
|
|
1057
1062
|
is_compat = n_type >> 1;
|
|
1058
1063
|
|
|
@@ -197,6 +197,8 @@ typedef struct JSThreadState {
|
|
|
197
197
|
#endif // USE_WORKER
|
|
198
198
|
JSClassID std_file_class_id;
|
|
199
199
|
JSClassID worker_class_id;
|
|
200
|
+
JSInterruptHandler *prev_interrupt_handler;
|
|
201
|
+
void *prev_interrupt_opaque;
|
|
200
202
|
} JSThreadState;
|
|
201
203
|
|
|
202
204
|
static uint64_t os_pending_signals;
|
|
@@ -1085,7 +1087,13 @@ static JSValue js_std_gc(JSContext *ctx, JSValueConst this_val,
|
|
|
1085
1087
|
|
|
1086
1088
|
static int interrupt_handler(JSRuntime *rt, void *opaque)
|
|
1087
1089
|
{
|
|
1088
|
-
|
|
1090
|
+
JSThreadState *ts = opaque;
|
|
1091
|
+
|
|
1092
|
+
if (1 & (os_pending_signals >> SIGINT))
|
|
1093
|
+
return 1;
|
|
1094
|
+
if (ts->prev_interrupt_handler)
|
|
1095
|
+
return ts->prev_interrupt_handler(rt, ts->prev_interrupt_opaque);
|
|
1096
|
+
return 0;
|
|
1089
1097
|
}
|
|
1090
1098
|
|
|
1091
1099
|
static JSValue js_evalScript(JSContext *ctx, JSValueConst this_val,
|
|
@@ -1148,7 +1156,14 @@ static JSValue js_evalScript(JSContext *ctx, JSValueConst this_val,
|
|
|
1148
1156
|
}
|
|
1149
1157
|
if (!ts->recv_pipe && ++ts->eval_script_recurse == 1) {
|
|
1150
1158
|
/* install the interrupt handler */
|
|
1151
|
-
|
|
1159
|
+
ts->prev_interrupt_handler =
|
|
1160
|
+
(JSInterruptHandler *)js_std_cmd(/*GetInterruptHandler*/5, rt);
|
|
1161
|
+
ts->prev_interrupt_opaque =
|
|
1162
|
+
(void *)js_std_cmd(/*GetInterruptOpaque*/6, rt);
|
|
1163
|
+
// FIXME(bnoordhuis) Questionable hack to make the REPL interruptible.
|
|
1164
|
+
// Ideally qjs installs a signal handler + interrupt handler but then
|
|
1165
|
+
// scripts can intercept it with os.signal(SIGINT).
|
|
1166
|
+
JS_SetInterruptHandler(JS_GetRuntime(ctx), interrupt_handler, ts);
|
|
1152
1167
|
}
|
|
1153
1168
|
flags = compile_module ? JS_EVAL_TYPE_MODULE : JS_EVAL_TYPE_GLOBAL;
|
|
1154
1169
|
if (backtrace_barrier)
|
|
@@ -1166,7 +1181,11 @@ static JSValue js_evalScript(JSContext *ctx, JSValueConst this_val,
|
|
|
1166
1181
|
JS_FreeCString(ctx, str);
|
|
1167
1182
|
if (!ts->recv_pipe && --ts->eval_script_recurse == 0) {
|
|
1168
1183
|
/* remove the interrupt handler */
|
|
1169
|
-
JS_SetInterruptHandler(JS_GetRuntime(ctx),
|
|
1184
|
+
JS_SetInterruptHandler(JS_GetRuntime(ctx),
|
|
1185
|
+
ts->prev_interrupt_handler,
|
|
1186
|
+
ts->prev_interrupt_opaque);
|
|
1187
|
+
ts->prev_interrupt_handler = NULL;
|
|
1188
|
+
ts->prev_interrupt_opaque = NULL;
|
|
1170
1189
|
os_pending_signals &= ~((uint64_t)1 << SIGINT);
|
|
1171
1190
|
/* convert the uncatchable "interrupted" error into a normal error
|
|
1172
1191
|
so that it can be caught by the REPL */
|
|
@@ -4950,23 +4950,34 @@ fail:
|
|
|
4950
4950
|
return NULL;
|
|
4951
4951
|
}
|
|
4952
4952
|
|
|
4953
|
+
static void copy_str16(uint16_t *dst, JSString *p, int offset, int len)
|
|
4954
|
+
{
|
|
4955
|
+
if (p->is_wide_char) {
|
|
4956
|
+
memcpy(dst, str16(p) + offset, len * 2);
|
|
4957
|
+
} else {
|
|
4958
|
+
const uint8_t *src1 = str8(p) + offset;
|
|
4959
|
+
int i;
|
|
4960
|
+
|
|
4961
|
+
for(i = 0; i < len; i++)
|
|
4962
|
+
dst[i] = src1[i];
|
|
4963
|
+
}
|
|
4964
|
+
}
|
|
4965
|
+
|
|
4953
4966
|
const uint16_t *JS_ToCStringLenUTF16(JSContext *ctx, size_t *plen,
|
|
4954
4967
|
JSValueConst val1)
|
|
4955
4968
|
{
|
|
4956
4969
|
JSString *p, *q;
|
|
4957
|
-
uint32_t i;
|
|
4958
4970
|
JSValue v;
|
|
4959
4971
|
|
|
4960
4972
|
v = js_force_tostring(ctx, val1);
|
|
4961
4973
|
if (JS_IsException(v))
|
|
4962
4974
|
goto fail;
|
|
4963
4975
|
p = JS_VALUE_GET_STRING(v);
|
|
4964
|
-
if (!p->is_wide_char) {
|
|
4976
|
+
if (!(p->is_wide_char && p->kind == JS_STRING_KIND_NORMAL)) {
|
|
4965
4977
|
q = js_alloc_string(ctx, p->len, /*is_wide_char*/true);
|
|
4966
4978
|
if (!q)
|
|
4967
4979
|
goto fail;
|
|
4968
|
-
|
|
4969
|
-
str16(q)[i] = str8(p)[i];
|
|
4980
|
+
copy_str16(str16(q), p, 0, p->len);
|
|
4970
4981
|
JS_FreeValue(ctx, v);
|
|
4971
4982
|
p = q;
|
|
4972
4983
|
}
|
|
@@ -5411,19 +5422,6 @@ static JSValue js_linearize_string_rope(JSContext *ctx, JSValueConst rope)
|
|
|
5411
5422
|
/* flat string concatenation - used by rope when concatenating short strings */
|
|
5412
5423
|
static JSValue JS_ConcatString2(JSContext *ctx, JSValue op1, JSValue op2);
|
|
5413
5424
|
|
|
5414
|
-
static void copy_str16(uint16_t *dst, JSString *p, int offset, int len)
|
|
5415
|
-
{
|
|
5416
|
-
if (p->is_wide_char) {
|
|
5417
|
-
memcpy(dst, str16(p) + offset, len * 2);
|
|
5418
|
-
} else {
|
|
5419
|
-
const uint8_t *src1 = str8(p) + offset;
|
|
5420
|
-
int i;
|
|
5421
|
-
|
|
5422
|
-
for(i = 0; i < len; i++)
|
|
5423
|
-
dst[i] = src1[i];
|
|
5424
|
-
}
|
|
5425
|
-
}
|
|
5426
|
-
|
|
5427
5425
|
static JSValue JS_ConcatString1(JSContext *ctx, JSString *p1, JSString *p2)
|
|
5428
5426
|
{
|
|
5429
5427
|
JSString *p;
|
|
@@ -8071,7 +8069,8 @@ static int find_line_num(JSContext *ctx, JSFunctionBytecode *b,
|
|
|
8071
8069
|
uint32_t pc_value, int *col)
|
|
8072
8070
|
{
|
|
8073
8071
|
const uint8_t *p_end, *p;
|
|
8074
|
-
int new_line_num, new_col_num, line_num, col_num, pc,
|
|
8072
|
+
int new_line_num, new_col_num, line_num, col_num, pc, ret;
|
|
8073
|
+
int32_t v;
|
|
8075
8074
|
unsigned int op;
|
|
8076
8075
|
|
|
8077
8076
|
*col = 1;
|
|
@@ -45319,50 +45318,58 @@ fail:
|
|
|
45319
45318
|
static JSValue js_iterator_from(JSContext *ctx, JSValueConst this_val,
|
|
45320
45319
|
int argc, JSValueConst *argv)
|
|
45321
45320
|
{
|
|
45322
|
-
JSValue method, iter;
|
|
45321
|
+
JSValue method, iter, next, wrapper;
|
|
45323
45322
|
JSIteratorWrapData *it;
|
|
45324
45323
|
int ret;
|
|
45325
45324
|
|
|
45326
45325
|
JSValueConst obj = argv[0];
|
|
45327
|
-
if (JS_IsString(obj))
|
|
45328
|
-
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
|
|
45329
|
-
if (JS_IsException(method))
|
|
45330
|
-
return JS_EXCEPTION;
|
|
45331
|
-
return JS_CallFree(ctx, method, obj, 0, NULL);
|
|
45332
|
-
}
|
|
45333
|
-
if (!JS_IsObject(obj))
|
|
45326
|
+
if (!JS_IsObject(obj) && !JS_IsString(obj))
|
|
45334
45327
|
return JS_ThrowTypeError(ctx, "Iterator.from called on non-object");
|
|
45335
|
-
ret = JS_OrdinaryIsInstanceOf(ctx, obj, ctx->iterator_ctor);
|
|
45336
|
-
if (ret < 0)
|
|
45337
|
-
return JS_EXCEPTION;
|
|
45338
|
-
if (ret)
|
|
45339
|
-
return js_dup(obj);
|
|
45340
45328
|
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
|
|
45341
45329
|
if (JS_IsException(method))
|
|
45342
45330
|
return JS_EXCEPTION;
|
|
45343
45331
|
if (JS_IsNull(method) || JS_IsUndefined(method)) {
|
|
45344
|
-
|
|
45345
|
-
if (JS_IsException(method))
|
|
45346
|
-
return JS_EXCEPTION;
|
|
45347
|
-
iter = JS_NewObjectClass(ctx, JS_CLASS_ITERATOR_WRAP);
|
|
45348
|
-
if (JS_IsException(iter))
|
|
45349
|
-
goto fail;
|
|
45350
|
-
it = js_malloc(ctx, sizeof(*it));
|
|
45351
|
-
if (!it)
|
|
45352
|
-
goto fail;
|
|
45353
|
-
it->wrapped_iter = js_dup(obj);
|
|
45354
|
-
it->wrapped_next = method;
|
|
45355
|
-
JS_SetOpaqueInternal(iter, it);
|
|
45332
|
+
iter = js_dup(obj);
|
|
45356
45333
|
} else {
|
|
45357
45334
|
iter = JS_GetIterator2(ctx, obj, method);
|
|
45358
|
-
JS_FreeValue(ctx, method);
|
|
45359
|
-
if (JS_IsException(iter))
|
|
45360
|
-
return JS_EXCEPTION;
|
|
45361
45335
|
}
|
|
45362
|
-
return iter;
|
|
45363
|
-
fail:
|
|
45364
45336
|
JS_FreeValue(ctx, method);
|
|
45337
|
+
if (JS_IsException(iter))
|
|
45338
|
+
return JS_EXCEPTION;
|
|
45339
|
+
if (!JS_IsObject(iter)) {
|
|
45340
|
+
JS_FreeValue(ctx, iter);
|
|
45341
|
+
return JS_ThrowTypeErrorNotAnObject(ctx);
|
|
45342
|
+
}
|
|
45343
|
+
|
|
45344
|
+
/* GetIteratorDirect */
|
|
45345
|
+
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
|
|
45346
|
+
if (JS_IsException(next)) {
|
|
45347
|
+
JS_FreeValue(ctx, iter);
|
|
45348
|
+
return JS_EXCEPTION;
|
|
45349
|
+
}
|
|
45350
|
+
ret = JS_OrdinaryIsInstanceOf(ctx, iter, ctx->iterator_ctor);
|
|
45351
|
+
if (ret < 0)
|
|
45352
|
+
goto fail;
|
|
45353
|
+
if (ret) {
|
|
45354
|
+
JS_FreeValue(ctx, next);
|
|
45355
|
+
return iter;
|
|
45356
|
+
}
|
|
45357
|
+
|
|
45358
|
+
wrapper = JS_NewObjectClass(ctx, JS_CLASS_ITERATOR_WRAP);
|
|
45359
|
+
if (JS_IsException(wrapper))
|
|
45360
|
+
goto fail;
|
|
45361
|
+
it = js_malloc(ctx, sizeof(*it));
|
|
45362
|
+
if (!it) {
|
|
45363
|
+
JS_FreeValue(ctx, wrapper);
|
|
45364
|
+
goto fail;
|
|
45365
|
+
}
|
|
45366
|
+
it->wrapped_iter = iter;
|
|
45367
|
+
it->wrapped_next = next;
|
|
45368
|
+
JS_SetOpaqueInternal(wrapper, it);
|
|
45369
|
+
return wrapper;
|
|
45370
|
+
fail:
|
|
45365
45371
|
JS_FreeValue(ctx, iter);
|
|
45372
|
+
JS_FreeValue(ctx, next);
|
|
45366
45373
|
return JS_EXCEPTION;
|
|
45367
45374
|
}
|
|
45368
45375
|
|
|
@@ -46689,7 +46696,8 @@ static JSValue js_parseInt(JSContext *ctx, JSValueConst this_val,
|
|
|
46689
46696
|
int argc, JSValueConst *argv)
|
|
46690
46697
|
{
|
|
46691
46698
|
const char *str, *p;
|
|
46692
|
-
int
|
|
46699
|
+
int flags;
|
|
46700
|
+
int32_t radix;
|
|
46693
46701
|
JSValue ret;
|
|
46694
46702
|
|
|
46695
46703
|
str = JS_ToCString(ctx, argv[0]);
|
|
@@ -56059,34 +56067,29 @@ static JSValue js_promise_resolve(JSContext *ctx, JSValueConst this_val,
|
|
|
56059
56067
|
static JSValue js_promise_withResolvers(JSContext *ctx, JSValueConst this_val,
|
|
56060
56068
|
int argc, JSValueConst *argv)
|
|
56061
56069
|
{
|
|
56062
|
-
|
|
56070
|
+
static const JSAtom atoms[] = {JS_ATOM_promise, JS_ATOM_resolve, JS_ATOM_reject};
|
|
56071
|
+
JSValue values[3], obj, *pval;
|
|
56072
|
+
int i, ret;
|
|
56073
|
+
|
|
56063
56074
|
if (!JS_IsObject(this_val))
|
|
56064
56075
|
return JS_ThrowTypeErrorNotAnObject(ctx);
|
|
56065
|
-
|
|
56066
|
-
if (JS_IsException(
|
|
56076
|
+
values[0] = js_new_promise_capability(ctx, &values[1], this_val);
|
|
56077
|
+
if (JS_IsException(values[0]))
|
|
56067
56078
|
return JS_EXCEPTION;
|
|
56068
56079
|
obj = JS_NewObject(ctx);
|
|
56069
56080
|
if (JS_IsException(obj))
|
|
56070
56081
|
goto exception;
|
|
56071
|
-
|
|
56072
|
-
|
|
56073
|
-
|
|
56074
|
-
|
|
56075
|
-
|
|
56076
|
-
|
|
56077
|
-
JS_PROP_C_W_E) < 0) {
|
|
56078
|
-
goto exception;
|
|
56079
|
-
}
|
|
56080
|
-
resolving_funcs[0] = JS_UNDEFINED;
|
|
56081
|
-
if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_reject, resolving_funcs[1],
|
|
56082
|
-
JS_PROP_C_W_E) < 0) {
|
|
56083
|
-
goto exception;
|
|
56082
|
+
for (i = 0; i < (int)countof(values); i++) {
|
|
56083
|
+
pval = &values[i];
|
|
56084
|
+
ret = JS_DefinePropertyValue(ctx, obj, atoms[i], *pval, JS_PROP_C_W_E);
|
|
56085
|
+
*pval = JS_UNDEFINED; // consumed by JS_DefinePropertyValue
|
|
56086
|
+
if (ret < 0)
|
|
56087
|
+
goto exception;
|
|
56084
56088
|
}
|
|
56085
56089
|
return obj;
|
|
56086
56090
|
exception:
|
|
56087
|
-
|
|
56088
|
-
|
|
56089
|
-
JS_FreeValue(ctx, result_promise);
|
|
56091
|
+
for (i = 0; i < (int)countof(values); i++)
|
|
56092
|
+
JS_FreeValue(ctx, values[i]);
|
|
56090
56093
|
JS_FreeValue(ctx, obj);
|
|
56091
56094
|
return JS_EXCEPTION;
|
|
56092
56095
|
}
|
|
@@ -56124,7 +56127,7 @@ static __exception int remainingElementsCount_add(JSContext *ctx,
|
|
|
56124
56127
|
int addend)
|
|
56125
56128
|
{
|
|
56126
56129
|
JSValue val;
|
|
56127
|
-
|
|
56130
|
+
int32_t remainingElementsCount;
|
|
56128
56131
|
|
|
56129
56132
|
val = JS_GetPropertyUint32(ctx, resolve_element_env, 0);
|
|
56130
56133
|
if (JS_IsException(val))
|
|
@@ -56155,7 +56158,8 @@ static JSValue js_promise_all_resolve_element(JSContext *ctx,
|
|
|
56155
56158
|
JSValueConst resolve = func_data[3];
|
|
56156
56159
|
JSValueConst resolve_element_env = func_data[4];
|
|
56157
56160
|
JSValue ret, obj;
|
|
56158
|
-
int is_zero
|
|
56161
|
+
int is_zero;
|
|
56162
|
+
int32_t index;
|
|
56159
56163
|
|
|
56160
56164
|
if (JS_ToInt32(ctx, &index, func_data[1]))
|
|
56161
56165
|
return JS_EXCEPTION;
|
|
@@ -59891,9 +59895,21 @@ static JSValue js_typed_array_get_byteOffset(JSContext *ctx, JSValueConst this_v
|
|
|
59891
59895
|
JSValue JS_NewTypedArray(JSContext *ctx, int argc, JSValueConst *argv,
|
|
59892
59896
|
JSTypedArrayEnum type)
|
|
59893
59897
|
{
|
|
59898
|
+
JSValueConst temp[3];
|
|
59899
|
+
|
|
59894
59900
|
if (type < JS_TYPED_ARRAY_UINT8C || type > JS_TYPED_ARRAY_FLOAT64)
|
|
59895
59901
|
return JS_ThrowRangeError(ctx, "invalid typed array type");
|
|
59896
|
-
|
|
59902
|
+
// js_typed_array_constructor makes assumptions about the length
|
|
59903
|
+
// of the argv vector without checking argc, so let's ensure our
|
|
59904
|
+
// side upholds said assumptions
|
|
59905
|
+
if (argc < countof(temp)) {
|
|
59906
|
+
temp[0] = temp[1] = temp[2] = JS_UNDEFINED;
|
|
59907
|
+
switch (argc) {
|
|
59908
|
+
case 2: temp[1] = argv[1]; // fallthru
|
|
59909
|
+
case 1: temp[0] = argv[0]; // fallthru
|
|
59910
|
+
}
|
|
59911
|
+
argv = temp;
|
|
59912
|
+
}
|
|
59897
59913
|
return js_typed_array_constructor(ctx, JS_UNDEFINED, argc, argv,
|
|
59898
59914
|
JS_CLASS_UINT8C_ARRAY + type);
|
|
59899
59915
|
}
|
|
@@ -60244,6 +60260,7 @@ static JSValue js_typed_array_create(JSContext *ctx, JSValueConst ctor,
|
|
|
60244
60260
|
return ret;
|
|
60245
60261
|
}
|
|
60246
60262
|
|
|
60263
|
+
// expects typed array object in argv[0] so argc *must* be > 0
|
|
60247
60264
|
static JSValue js_typed_array___speciesCreate(JSContext *ctx,
|
|
60248
60265
|
JSValueConst this_val,
|
|
60249
60266
|
int argc, JSValueConst *argv,
|
|
@@ -60252,8 +60269,8 @@ static JSValue js_typed_array___speciesCreate(JSContext *ctx,
|
|
|
60252
60269
|
JSValueConst obj;
|
|
60253
60270
|
JSObject *p;
|
|
60254
60271
|
JSValue ctor, ret;
|
|
60255
|
-
int argc1;
|
|
60256
60272
|
|
|
60273
|
+
assert(argc > 0);
|
|
60257
60274
|
obj = argv[0];
|
|
60258
60275
|
p = get_typed_array(ctx, obj);
|
|
60259
60276
|
if (!p)
|
|
@@ -60261,12 +60278,13 @@ static JSValue js_typed_array___speciesCreate(JSContext *ctx,
|
|
|
60261
60278
|
ctor = JS_SpeciesConstructor(ctx, obj, JS_UNDEFINED);
|
|
60262
60279
|
if (JS_IsException(ctor))
|
|
60263
60280
|
return ctor;
|
|
60264
|
-
|
|
60281
|
+
argc--;
|
|
60282
|
+
argv++;
|
|
60265
60283
|
if (JS_IsUndefined(ctor)) {
|
|
60266
|
-
ret = js_typed_array_constructor(ctx, JS_UNDEFINED,
|
|
60284
|
+
ret = js_typed_array_constructor(ctx, JS_UNDEFINED, argc, argv,
|
|
60267
60285
|
p->class_id);
|
|
60268
60286
|
} else {
|
|
60269
|
-
ret = js_typed_array_create(ctx, ctor,
|
|
60287
|
+
ret = js_typed_array_create(ctx, ctor, argc, argv, require_mutable);
|
|
60270
60288
|
JS_FreeValue(ctx, ctor);
|
|
60271
60289
|
}
|
|
60272
60290
|
return ret;
|
|
@@ -62740,7 +62758,8 @@ static JSValue js_atomics_notify(JSContext *ctx,
|
|
|
62740
62758
|
{
|
|
62741
62759
|
struct list_head *el, *el1, waiter_list;
|
|
62742
62760
|
int size_log2;
|
|
62743
|
-
|
|
62761
|
+
int count;
|
|
62762
|
+
int32_t n;
|
|
62744
62763
|
void *ptr;
|
|
62745
62764
|
uint64_t idx;
|
|
62746
62765
|
JSObject *p;
|
|
@@ -64859,6 +64878,14 @@ uintptr_t js_std_cmd(int cmd, ...) {
|
|
|
64859
64878
|
rt = va_arg(ap, JSRuntime *);
|
|
64860
64879
|
rv = rt->shape_hash_count;
|
|
64861
64880
|
break;
|
|
64881
|
+
case 5: // GetInterruptHandler
|
|
64882
|
+
rt = va_arg(ap, JSRuntime *);
|
|
64883
|
+
rv = (uintptr_t)rt->interrupt_handler;
|
|
64884
|
+
break;
|
|
64885
|
+
case 6: // GetInterruptOpaque
|
|
64886
|
+
rt = va_arg(ap, JSRuntime *);
|
|
64887
|
+
rv = (uintptr_t)rt->interrupt_opaque;
|
|
64888
|
+
break;
|
|
64862
64889
|
default:
|
|
64863
64890
|
rv = -1;
|
|
64864
64891
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omdev-cext
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.53
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.15
|
|
|
14
14
|
Requires-Python: >=3.14
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: omdev==0.0.
|
|
17
|
+
Requires-Dist: omdev==0.0.53
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
20
20
|
# Overview
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
omdev==0.0.53
|
|
@@ -13,7 +13,7 @@ urls = {source = 'https://github.com/wrmsr/om'}
|
|
|
13
13
|
license = 'BSD-3-Clause'
|
|
14
14
|
readme = 'README.md'
|
|
15
15
|
requires-python = '>=3.14'
|
|
16
|
-
version = '0.0.
|
|
16
|
+
version = '0.0.53'
|
|
17
17
|
classifiers = [
|
|
18
18
|
'Intended Audience :: Developers',
|
|
19
19
|
'Operating System :: OS Independent',
|
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
]
|
|
25
25
|
description = 'omdev'
|
|
26
26
|
dependencies = [
|
|
27
|
-
'omdev == 0.0.
|
|
27
|
+
'omdev == 0.0.53',
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
[tool.setuptools]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
omdev==0.0.52
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{omdev_cext-0.0.52 → omdev_cext-0.0.53}/omdev/js/quickjs/_quickjs/builtin-iterator-zip-keyed.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|