duktape 2.3.0.0 → 2.7.0.0
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.
- checksums.yaml +5 -5
- data/CHANGELOG.md +8 -1
- data/ext/duktape/duk_config.h +161 -45
- data/ext/duktape/duktape.c +22842 -18154
- data/ext/duktape/duktape.h +45 -8
- data/lib/duktape/version.rb +1 -1
- metadata +7 -8
data/ext/duktape/duktape.h
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
/*
|
2
|
-
* Duktape public API for Duktape 2.
|
2
|
+
* Duktape public API for Duktape 2.7.0.
|
3
3
|
*
|
4
4
|
* See the API reference for documentation on call semantics. The exposed,
|
5
5
|
* supported API is between the "BEGIN PUBLIC API" and "END PUBLIC API"
|
6
6
|
* comments. Other parts of the header are Duktape internal and related to
|
7
7
|
* e.g. platform/compiler/feature detection.
|
8
8
|
*
|
9
|
-
* Git commit
|
10
|
-
* Git branch
|
9
|
+
* Git commit 03d4d728f8365021de6955c649e6dcd05dcca99f (v2.7.0).
|
10
|
+
* Git branch HEAD.
|
11
11
|
*
|
12
12
|
* See Duktape AUTHORS.rst and LICENSE.txt for copyright and
|
13
13
|
* licensing information.
|
@@ -21,7 +21,7 @@
|
|
21
21
|
*
|
22
22
|
* (http://opensource.org/licenses/MIT)
|
23
23
|
*
|
24
|
-
* Copyright (c) 2013-
|
24
|
+
* Copyright (c) 2013-present by Duktape authors (see AUTHORS.rst)
|
25
25
|
*
|
26
26
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
27
27
|
* of this software and associated documentation files (the "Software"), to deal
|
@@ -100,6 +100,22 @@
|
|
100
100
|
* * Michal Kasperek (https://github.com/michalkas)
|
101
101
|
* * Andrew Janke (https://github.com/apjanke)
|
102
102
|
* * Steve Fan (https://github.com/stevefan1999)
|
103
|
+
* * Edward Betts (https://github.com/edwardbetts)
|
104
|
+
* * Ozhan Duz (https://github.com/webfolderio)
|
105
|
+
* * Akos Kiss (https://github.com/akosthekiss)
|
106
|
+
* * TheBrokenRail (https://github.com/TheBrokenRail)
|
107
|
+
* * Jesse Doyle (https://github.com/jessedoyle)
|
108
|
+
* * Gero Kuehn (https://github.com/dc6jgk)
|
109
|
+
* * James Swift (https://github.com/phraemer)
|
110
|
+
* * Luis de Bethencourt (https://github.com/luisbg)
|
111
|
+
* * Ian Whyman (https://github.com/v00d00)
|
112
|
+
* * Rick Sayre (https://github.com/whorfin)
|
113
|
+
* * Craig Leres (https://github.com/leres)
|
114
|
+
* * Maurici Abad (https://github.com/mauriciabad)
|
115
|
+
* * Nancy Li (https://github.com/NancyLi1013)
|
116
|
+
* * William Parks (https://github.com/WilliamParks)
|
117
|
+
* * Sam Hellawell (https://github.com/samhellawell)
|
118
|
+
* * Vladislavs Sokurenko (https://github.com/sokurenko)
|
103
119
|
*
|
104
120
|
* Other contributions
|
105
121
|
* ===================
|
@@ -140,6 +156,8 @@
|
|
140
156
|
* * Neil Kolban (https://github.com/nkolban)
|
141
157
|
* * Wilhelm Wanecek (https://github.com/wanecek)
|
142
158
|
* * Andrew Janke (https://github.com/apjanke)
|
159
|
+
* * Unamer (https://github.com/unamer)
|
160
|
+
* * Karl Dahlke (eklhad@gmail.com)
|
143
161
|
*
|
144
162
|
* If you are accidentally missing from this list, send me an e-mail
|
145
163
|
* (``sami.vaarala@iki.fi``) and I'll fix the omission.
|
@@ -164,16 +182,16 @@
|
|
164
182
|
* development snapshots have 99 for patch level (e.g. 0.10.99 would be a
|
165
183
|
* development version after 0.10.0 but before the next official release).
|
166
184
|
*/
|
167
|
-
#define DUK_VERSION
|
185
|
+
#define DUK_VERSION 20700L
|
168
186
|
|
169
187
|
/* Git commit, describe, and branch for Duktape build. Useful for
|
170
188
|
* non-official snapshot builds so that application code can easily log
|
171
189
|
* which Duktape snapshot was used. Not available in the ECMAScript
|
172
190
|
* environment.
|
173
191
|
*/
|
174
|
-
#define DUK_GIT_COMMIT "
|
175
|
-
#define DUK_GIT_DESCRIBE "v2.
|
176
|
-
#define DUK_GIT_BRANCH "
|
192
|
+
#define DUK_GIT_COMMIT "03d4d728f8365021de6955c649e6dcd05dcca99f"
|
193
|
+
#define DUK_GIT_DESCRIBE "v2.7.0"
|
194
|
+
#define DUK_GIT_BRANCH "HEAD"
|
177
195
|
|
178
196
|
/* External duk_config.h provides platform/compiler/OS dependent
|
179
197
|
* typedefs and macros, and DUK_USE_xxx config options so that
|
@@ -383,30 +401,35 @@ struct duk_time_components {
|
|
383
401
|
#define DUK_DEFPROP_C DUK_DEFPROP_CONFIGURABLE
|
384
402
|
#define DUK_DEFPROP_WE (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)
|
385
403
|
#define DUK_DEFPROP_WC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)
|
404
|
+
#define DUK_DEFPROP_EC (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
|
386
405
|
#define DUK_DEFPROP_WEC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
|
387
406
|
#define DUK_DEFPROP_HAVE_W DUK_DEFPROP_HAVE_WRITABLE
|
388
407
|
#define DUK_DEFPROP_HAVE_E DUK_DEFPROP_HAVE_ENUMERABLE
|
389
408
|
#define DUK_DEFPROP_HAVE_C DUK_DEFPROP_HAVE_CONFIGURABLE
|
390
409
|
#define DUK_DEFPROP_HAVE_WE (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)
|
391
410
|
#define DUK_DEFPROP_HAVE_WC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
|
411
|
+
#define DUK_DEFPROP_HAVE_EC (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
|
392
412
|
#define DUK_DEFPROP_HAVE_WEC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
|
393
413
|
#define DUK_DEFPROP_SET_W DUK_DEFPROP_SET_WRITABLE
|
394
414
|
#define DUK_DEFPROP_SET_E DUK_DEFPROP_SET_ENUMERABLE
|
395
415
|
#define DUK_DEFPROP_SET_C DUK_DEFPROP_SET_CONFIGURABLE
|
396
416
|
#define DUK_DEFPROP_SET_WE (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)
|
397
417
|
#define DUK_DEFPROP_SET_WC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)
|
418
|
+
#define DUK_DEFPROP_SET_EC (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
|
398
419
|
#define DUK_DEFPROP_SET_WEC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
|
399
420
|
#define DUK_DEFPROP_CLEAR_W DUK_DEFPROP_CLEAR_WRITABLE
|
400
421
|
#define DUK_DEFPROP_CLEAR_E DUK_DEFPROP_CLEAR_ENUMERABLE
|
401
422
|
#define DUK_DEFPROP_CLEAR_C DUK_DEFPROP_CLEAR_CONFIGURABLE
|
402
423
|
#define DUK_DEFPROP_CLEAR_WE (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)
|
403
424
|
#define DUK_DEFPROP_CLEAR_WC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
|
425
|
+
#define DUK_DEFPROP_CLEAR_EC (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
|
404
426
|
#define DUK_DEFPROP_CLEAR_WEC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
|
405
427
|
#define DUK_DEFPROP_ATTR_W (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)
|
406
428
|
#define DUK_DEFPROP_ATTR_E (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)
|
407
429
|
#define DUK_DEFPROP_ATTR_C (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)
|
408
430
|
#define DUK_DEFPROP_ATTR_WE (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)
|
409
431
|
#define DUK_DEFPROP_ATTR_WC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)
|
432
|
+
#define DUK_DEFPROP_ATTR_EC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)
|
410
433
|
#define DUK_DEFPROP_ATTR_WEC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)
|
411
434
|
|
412
435
|
/* Flags for duk_push_thread_raw() */
|
@@ -447,18 +470,24 @@ struct duk_time_components {
|
|
447
470
|
* Macros to create Symbols as C statically constructed strings.
|
448
471
|
*
|
449
472
|
* Call e.g. as DUK_HIDDEN_SYMBOL("myProperty") <=> ("\xFF" "myProperty").
|
473
|
+
*
|
450
474
|
* Local symbols have a unique suffix, caller should take care to avoid
|
451
475
|
* conflicting with the Duktape internal representation by e.g. prepending
|
452
476
|
* a '!' character: DUK_LOCAL_SYMBOL("myLocal", "!123").
|
453
477
|
*
|
454
478
|
* Note that these can only be used for string constants, not dynamically
|
455
479
|
* created strings.
|
480
|
+
*
|
481
|
+
* You shouldn't normally use DUK_INTERNAL_SYMBOL() at all. It is reserved
|
482
|
+
* for Duktape internal symbols only. There are no versioning guarantees
|
483
|
+
* for internal symbols.
|
456
484
|
*/
|
457
485
|
|
458
486
|
#define DUK_HIDDEN_SYMBOL(x) ("\xFF" x)
|
459
487
|
#define DUK_GLOBAL_SYMBOL(x) ("\x80" x)
|
460
488
|
#define DUK_LOCAL_SYMBOL(x,uniq) ("\x81" x "\xff" uniq)
|
461
489
|
#define DUK_WELLKNOWN_SYMBOL(x) ("\x81" x "\xff")
|
490
|
+
#define DUK_INTERNAL_SYMBOL(x) ("\x82" x)
|
462
491
|
|
463
492
|
/*
|
464
493
|
* If no variadic macros, __FILE__ and __LINE__ are passed through globals
|
@@ -644,6 +673,7 @@ DUK_EXTERNAL_DECL void duk_swap_top(duk_context *ctx, duk_idx_t idx);
|
|
644
673
|
DUK_EXTERNAL_DECL void duk_dup(duk_context *ctx, duk_idx_t from_idx);
|
645
674
|
DUK_EXTERNAL_DECL void duk_dup_top(duk_context *ctx);
|
646
675
|
DUK_EXTERNAL_DECL void duk_insert(duk_context *ctx, duk_idx_t to_idx);
|
676
|
+
DUK_EXTERNAL_DECL void duk_pull(duk_context *ctx, duk_idx_t from_idx);
|
647
677
|
DUK_EXTERNAL_DECL void duk_replace(duk_context *ctx, duk_idx_t to_idx);
|
648
678
|
DUK_EXTERNAL_DECL void duk_copy(duk_context *ctx, duk_idx_t from_idx, duk_idx_t to_idx);
|
649
679
|
DUK_EXTERNAL_DECL void duk_remove(duk_context *ctx, duk_idx_t idx);
|
@@ -703,6 +733,7 @@ DUK_EXTERNAL_DECL void duk_push_thread_stash(duk_context *ctx, duk_context *targ
|
|
703
733
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_object(duk_context *ctx);
|
704
734
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_object(duk_context *ctx);
|
705
735
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_array(duk_context *ctx);
|
736
|
+
DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_array(duk_context *ctx);
|
706
737
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_c_function(duk_context *ctx, duk_c_function func, duk_idx_t nargs);
|
707
738
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_c_lightfunc(duk_context *ctx, duk_c_function func, duk_idx_t nargs, duk_idx_t length, duk_int_t magic);
|
708
739
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_thread_raw(duk_context *ctx, duk_uint_t flags);
|
@@ -937,6 +968,8 @@ DUK_EXTERNAL_DECL duk_context *duk_require_context(duk_context *ctx, duk_idx_t i
|
|
937
968
|
DUK_EXTERNAL_DECL void duk_require_function(duk_context *ctx, duk_idx_t idx);
|
938
969
|
#define duk_require_callable(ctx,idx) \
|
939
970
|
duk_require_function((ctx), (idx))
|
971
|
+
DUK_EXTERNAL_DECL void duk_require_constructor_call(duk_context *ctx);
|
972
|
+
DUK_EXTERNAL_DECL void duk_require_constructable(duk_context *ctx, duk_idx_t idx);
|
940
973
|
DUK_EXTERNAL_DECL void *duk_require_heapptr(duk_context *ctx, duk_idx_t idx);
|
941
974
|
|
942
975
|
/* Symbols are object coercible and covered by DUK_TYPE_MASK_STRING. */
|
@@ -986,6 +1019,8 @@ DUK_EXTERNAL_DECL void duk_to_primitive(duk_context *ctx, duk_idx_t idx, duk_int
|
|
986
1019
|
|
987
1020
|
/* safe variants of a few coercion operations */
|
988
1021
|
DUK_EXTERNAL_DECL const char *duk_safe_to_lstring(duk_context *ctx, duk_idx_t idx, duk_size_t *out_len);
|
1022
|
+
DUK_EXTERNAL_DECL const char *duk_to_stacktrace(duk_context *ctx, duk_idx_t idx);
|
1023
|
+
DUK_EXTERNAL_DECL const char *duk_safe_to_stacktrace(duk_context *ctx, duk_idx_t idx);
|
989
1024
|
#define duk_safe_to_string(ctx,idx) \
|
990
1025
|
duk_safe_to_lstring((ctx), (idx), NULL)
|
991
1026
|
|
@@ -1010,6 +1045,8 @@ DUK_EXTERNAL_DECL const char *duk_hex_encode(duk_context *ctx, duk_idx_t idx);
|
|
1010
1045
|
DUK_EXTERNAL_DECL void duk_hex_decode(duk_context *ctx, duk_idx_t idx);
|
1011
1046
|
DUK_EXTERNAL_DECL const char *duk_json_encode(duk_context *ctx, duk_idx_t idx);
|
1012
1047
|
DUK_EXTERNAL_DECL void duk_json_decode(duk_context *ctx, duk_idx_t idx);
|
1048
|
+
DUK_EXTERNAL_DECL void duk_cbor_encode(duk_context *ctx, duk_idx_t idx, duk_uint_t encode_flags);
|
1049
|
+
DUK_EXTERNAL_DECL void duk_cbor_decode(duk_context *ctx, duk_idx_t idx, duk_uint_t decode_flags);
|
1013
1050
|
|
1014
1051
|
DUK_EXTERNAL_DECL const char *duk_buffer_to_string(duk_context *ctx, duk_idx_t idx);
|
1015
1052
|
|
data/lib/duktape/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duktape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Holm
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email: judofyr@gmail.com
|
15
15
|
executables: []
|
16
16
|
extensions:
|
@@ -30,7 +30,7 @@ homepage: https://github.com/judofyr/duktape.rb
|
|
30
30
|
licenses:
|
31
31
|
- MIT
|
32
32
|
metadata: {}
|
33
|
-
post_install_message:
|
33
|
+
post_install_message:
|
34
34
|
rdoc_options: []
|
35
35
|
require_paths:
|
36
36
|
- lib
|
@@ -45,9 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
|
-
|
49
|
-
|
50
|
-
signing_key:
|
48
|
+
rubygems_version: 3.0.3
|
49
|
+
signing_key:
|
51
50
|
specification_version: 4
|
52
51
|
summary: Bindings to the Duktape JavaScript interpreter
|
53
52
|
test_files: []
|