duktape 2.3.0.0 → 2.6.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,13 @@
1
1
  /*
2
- * Duktape public API for Duktape 2.3.0.
2
+ * Duktape public API for Duktape 2.6.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 7551eee6615c2633375bff51ceb297bc3bc7c77e (v2.0.1.0-5-g7551eee-dirty).
10
- * Git branch master.
9
+ * Git commit ee81aa9e0076e8049edbfe6aea96702e04f1827d (v2.0.1.0-13-gee81aa9-dirty).
10
+ * Git branch duktape-2.6.
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-2018 by Duktape authors (see AUTHORS.rst)
24
+ * Copyright (c) 2013-2019 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,16 @@
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)
103
113
  *
104
114
  * Other contributions
105
115
  * ===================
@@ -140,6 +150,8 @@
140
150
  * * Neil Kolban (https://github.com/nkolban)
141
151
  * * Wilhelm Wanecek (https://github.com/wanecek)
142
152
  * * Andrew Janke (https://github.com/apjanke)
153
+ * * Unamer (https://github.com/unamer)
154
+ * * Karl Dahlke (eklhad@gmail.com)
143
155
  *
144
156
  * If you are accidentally missing from this list, send me an e-mail
145
157
  * (``sami.vaarala@iki.fi``) and I'll fix the omission.
@@ -164,16 +176,16 @@
164
176
  * development snapshots have 99 for patch level (e.g. 0.10.99 would be a
165
177
  * development version after 0.10.0 but before the next official release).
166
178
  */
167
- #define DUK_VERSION 20300L
179
+ #define DUK_VERSION 20600L
168
180
 
169
181
  /* Git commit, describe, and branch for Duktape build. Useful for
170
182
  * non-official snapshot builds so that application code can easily log
171
183
  * which Duktape snapshot was used. Not available in the ECMAScript
172
184
  * environment.
173
185
  */
174
- #define DUK_GIT_COMMIT "7551eee6615c2633375bff51ceb297bc3bc7c77e"
175
- #define DUK_GIT_DESCRIBE "v2.0.1.0-5-g7551eee-dirty"
176
- #define DUK_GIT_BRANCH "master"
186
+ #define DUK_GIT_COMMIT "ee81aa9e0076e8049edbfe6aea96702e04f1827d"
187
+ #define DUK_GIT_DESCRIBE "v2.0.1.0-13-gee81aa9-dirty"
188
+ #define DUK_GIT_BRANCH "duktape-2.6"
177
189
 
178
190
  /* External duk_config.h provides platform/compiler/OS dependent
179
191
  * typedefs and macros, and DUK_USE_xxx config options so that
@@ -383,30 +395,35 @@ struct duk_time_components {
383
395
  #define DUK_DEFPROP_C DUK_DEFPROP_CONFIGURABLE
384
396
  #define DUK_DEFPROP_WE (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)
385
397
  #define DUK_DEFPROP_WC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)
398
+ #define DUK_DEFPROP_EC (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
386
399
  #define DUK_DEFPROP_WEC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
387
400
  #define DUK_DEFPROP_HAVE_W DUK_DEFPROP_HAVE_WRITABLE
388
401
  #define DUK_DEFPROP_HAVE_E DUK_DEFPROP_HAVE_ENUMERABLE
389
402
  #define DUK_DEFPROP_HAVE_C DUK_DEFPROP_HAVE_CONFIGURABLE
390
403
  #define DUK_DEFPROP_HAVE_WE (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)
391
404
  #define DUK_DEFPROP_HAVE_WC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
405
+ #define DUK_DEFPROP_HAVE_EC (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
392
406
  #define DUK_DEFPROP_HAVE_WEC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
393
407
  #define DUK_DEFPROP_SET_W DUK_DEFPROP_SET_WRITABLE
394
408
  #define DUK_DEFPROP_SET_E DUK_DEFPROP_SET_ENUMERABLE
395
409
  #define DUK_DEFPROP_SET_C DUK_DEFPROP_SET_CONFIGURABLE
396
410
  #define DUK_DEFPROP_SET_WE (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)
397
411
  #define DUK_DEFPROP_SET_WC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)
412
+ #define DUK_DEFPROP_SET_EC (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
398
413
  #define DUK_DEFPROP_SET_WEC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
399
414
  #define DUK_DEFPROP_CLEAR_W DUK_DEFPROP_CLEAR_WRITABLE
400
415
  #define DUK_DEFPROP_CLEAR_E DUK_DEFPROP_CLEAR_ENUMERABLE
401
416
  #define DUK_DEFPROP_CLEAR_C DUK_DEFPROP_CLEAR_CONFIGURABLE
402
417
  #define DUK_DEFPROP_CLEAR_WE (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)
403
418
  #define DUK_DEFPROP_CLEAR_WC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
419
+ #define DUK_DEFPROP_CLEAR_EC (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
404
420
  #define DUK_DEFPROP_CLEAR_WEC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
405
421
  #define DUK_DEFPROP_ATTR_W (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)
406
422
  #define DUK_DEFPROP_ATTR_E (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)
407
423
  #define DUK_DEFPROP_ATTR_C (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)
408
424
  #define DUK_DEFPROP_ATTR_WE (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)
409
425
  #define DUK_DEFPROP_ATTR_WC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)
426
+ #define DUK_DEFPROP_ATTR_EC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)
410
427
  #define DUK_DEFPROP_ATTR_WEC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)
411
428
 
412
429
  /* Flags for duk_push_thread_raw() */
@@ -447,18 +464,24 @@ struct duk_time_components {
447
464
  * Macros to create Symbols as C statically constructed strings.
448
465
  *
449
466
  * Call e.g. as DUK_HIDDEN_SYMBOL("myProperty") <=> ("\xFF" "myProperty").
467
+ *
450
468
  * Local symbols have a unique suffix, caller should take care to avoid
451
469
  * conflicting with the Duktape internal representation by e.g. prepending
452
470
  * a '!' character: DUK_LOCAL_SYMBOL("myLocal", "!123").
453
471
  *
454
472
  * Note that these can only be used for string constants, not dynamically
455
473
  * created strings.
474
+ *
475
+ * You shouldn't normally use DUK_INTERNAL_SYMBOL() at all. It is reserved
476
+ * for Duktape internal symbols only. There are no versioning guarantees
477
+ * for internal symbols.
456
478
  */
457
479
 
458
480
  #define DUK_HIDDEN_SYMBOL(x) ("\xFF" x)
459
481
  #define DUK_GLOBAL_SYMBOL(x) ("\x80" x)
460
482
  #define DUK_LOCAL_SYMBOL(x,uniq) ("\x81" x "\xff" uniq)
461
483
  #define DUK_WELLKNOWN_SYMBOL(x) ("\x81" x "\xff")
484
+ #define DUK_INTERNAL_SYMBOL(x) ("\x82" x)
462
485
 
463
486
  /*
464
487
  * If no variadic macros, __FILE__ and __LINE__ are passed through globals
@@ -644,6 +667,7 @@ DUK_EXTERNAL_DECL void duk_swap_top(duk_context *ctx, duk_idx_t idx);
644
667
  DUK_EXTERNAL_DECL void duk_dup(duk_context *ctx, duk_idx_t from_idx);
645
668
  DUK_EXTERNAL_DECL void duk_dup_top(duk_context *ctx);
646
669
  DUK_EXTERNAL_DECL void duk_insert(duk_context *ctx, duk_idx_t to_idx);
670
+ DUK_EXTERNAL_DECL void duk_pull(duk_context *ctx, duk_idx_t from_idx);
647
671
  DUK_EXTERNAL_DECL void duk_replace(duk_context *ctx, duk_idx_t to_idx);
648
672
  DUK_EXTERNAL_DECL void duk_copy(duk_context *ctx, duk_idx_t from_idx, duk_idx_t to_idx);
649
673
  DUK_EXTERNAL_DECL void duk_remove(duk_context *ctx, duk_idx_t idx);
@@ -703,6 +727,7 @@ DUK_EXTERNAL_DECL void duk_push_thread_stash(duk_context *ctx, duk_context *targ
703
727
  DUK_EXTERNAL_DECL duk_idx_t duk_push_object(duk_context *ctx);
704
728
  DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_object(duk_context *ctx);
705
729
  DUK_EXTERNAL_DECL duk_idx_t duk_push_array(duk_context *ctx);
730
+ DUK_EXTERNAL_DECL duk_idx_t duk_push_bare_array(duk_context *ctx);
706
731
  DUK_EXTERNAL_DECL duk_idx_t duk_push_c_function(duk_context *ctx, duk_c_function func, duk_idx_t nargs);
707
732
  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
733
  DUK_EXTERNAL_DECL duk_idx_t duk_push_thread_raw(duk_context *ctx, duk_uint_t flags);
@@ -937,6 +962,8 @@ DUK_EXTERNAL_DECL duk_context *duk_require_context(duk_context *ctx, duk_idx_t i
937
962
  DUK_EXTERNAL_DECL void duk_require_function(duk_context *ctx, duk_idx_t idx);
938
963
  #define duk_require_callable(ctx,idx) \
939
964
  duk_require_function((ctx), (idx))
965
+ DUK_EXTERNAL_DECL void duk_require_constructor_call(duk_context *ctx);
966
+ DUK_EXTERNAL_DECL void duk_require_constructable(duk_context *ctx, duk_idx_t idx);
940
967
  DUK_EXTERNAL_DECL void *duk_require_heapptr(duk_context *ctx, duk_idx_t idx);
941
968
 
942
969
  /* Symbols are object coercible and covered by DUK_TYPE_MASK_STRING. */
@@ -986,6 +1013,8 @@ DUK_EXTERNAL_DECL void duk_to_primitive(duk_context *ctx, duk_idx_t idx, duk_int
986
1013
 
987
1014
  /* safe variants of a few coercion operations */
988
1015
  DUK_EXTERNAL_DECL const char *duk_safe_to_lstring(duk_context *ctx, duk_idx_t idx, duk_size_t *out_len);
1016
+ DUK_EXTERNAL_DECL const char *duk_to_stacktrace(duk_context *ctx, duk_idx_t idx);
1017
+ DUK_EXTERNAL_DECL const char *duk_safe_to_stacktrace(duk_context *ctx, duk_idx_t idx);
989
1018
  #define duk_safe_to_string(ctx,idx) \
990
1019
  duk_safe_to_lstring((ctx), (idx), NULL)
991
1020
 
@@ -1010,6 +1039,8 @@ DUK_EXTERNAL_DECL const char *duk_hex_encode(duk_context *ctx, duk_idx_t idx);
1010
1039
  DUK_EXTERNAL_DECL void duk_hex_decode(duk_context *ctx, duk_idx_t idx);
1011
1040
  DUK_EXTERNAL_DECL const char *duk_json_encode(duk_context *ctx, duk_idx_t idx);
1012
1041
  DUK_EXTERNAL_DECL void duk_json_decode(duk_context *ctx, duk_idx_t idx);
1042
+ DUK_EXTERNAL_DECL void duk_cbor_encode(duk_context *ctx, duk_idx_t idx, duk_uint_t encode_flags);
1043
+ DUK_EXTERNAL_DECL void duk_cbor_decode(duk_context *ctx, duk_idx_t idx, duk_uint_t decode_flags);
1013
1044
 
1014
1045
  DUK_EXTERNAL_DECL const char *duk_buffer_to_string(duk_context *ctx, duk_idx_t idx);
1015
1046
 
@@ -1,3 +1,3 @@
1
1
  module Duktape
2
- VERSION = "2.3.0.0"
2
+ VERSION = "2.6.0.0"
3
3
  end
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.3.0.0
4
+ version: 2.6.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: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2021-01-31 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
- rubyforge_project:
49
- rubygems_version: 2.6.11
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: []