Browse Source

Merge pull request #2187 from svaarala/fix-missing-duk-def-prop-constants

Add some missing duk_def_prop() convenience constants ("EC" variants)
pull/2191/head
Sami Vaarala 5 years ago
committed by GitHub
parent
commit
44ca54f726
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      RELEASES.rst
  2. 5
      src-input/duktape.h.in
  3. 10
      website/api/duk_def_prop.yaml

4
RELEASES.rst

@ -3559,6 +3559,10 @@ Planned
* Include "end of input" in error message if SyntaxError occurs at end of
file (GH-2152, GH-2165)
* Add missing DUK_DEFPROP_xxx convenience constants for the 'EC' combination
(like DUK_DEFPROP_EC, DUK_DEFPROP_HAVE_EC, etc) which were accidentally
missing from the API header (GH-2187)
* Fix behavior of proxied Array objects for: Array.isArray(), duk_is_array(),
Object.prototype.toString(), JSON.stringify(), Array.prototype.concat()
(GH-2041, GH-2175, GH-2176)

5
src-input/duktape.h.in

@ -257,30 +257,35 @@ struct duk_time_components {
#define DUK_DEFPROP_C DUK_DEFPROP_CONFIGURABLE
#define DUK_DEFPROP_WE (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)
#define DUK_DEFPROP_WC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)
#define DUK_DEFPROP_EC (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
#define DUK_DEFPROP_WEC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
#define DUK_DEFPROP_HAVE_W DUK_DEFPROP_HAVE_WRITABLE
#define DUK_DEFPROP_HAVE_E DUK_DEFPROP_HAVE_ENUMERABLE
#define DUK_DEFPROP_HAVE_C DUK_DEFPROP_HAVE_CONFIGURABLE
#define DUK_DEFPROP_HAVE_WE (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)
#define DUK_DEFPROP_HAVE_WC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
#define DUK_DEFPROP_HAVE_EC (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
#define DUK_DEFPROP_HAVE_WEC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
#define DUK_DEFPROP_SET_W DUK_DEFPROP_SET_WRITABLE
#define DUK_DEFPROP_SET_E DUK_DEFPROP_SET_ENUMERABLE
#define DUK_DEFPROP_SET_C DUK_DEFPROP_SET_CONFIGURABLE
#define DUK_DEFPROP_SET_WE (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)
#define DUK_DEFPROP_SET_WC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)
#define DUK_DEFPROP_SET_EC (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
#define DUK_DEFPROP_SET_WEC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
#define DUK_DEFPROP_CLEAR_W DUK_DEFPROP_CLEAR_WRITABLE
#define DUK_DEFPROP_CLEAR_E DUK_DEFPROP_CLEAR_ENUMERABLE
#define DUK_DEFPROP_CLEAR_C DUK_DEFPROP_CLEAR_CONFIGURABLE
#define DUK_DEFPROP_CLEAR_WE (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)
#define DUK_DEFPROP_CLEAR_WC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
#define DUK_DEFPROP_CLEAR_EC (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
#define DUK_DEFPROP_CLEAR_WEC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
#define DUK_DEFPROP_ATTR_W (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)
#define DUK_DEFPROP_ATTR_E (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)
#define DUK_DEFPROP_ATTR_C (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)
#define DUK_DEFPROP_ATTR_WE (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)
#define DUK_DEFPROP_ATTR_WC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)
#define DUK_DEFPROP_ATTR_EC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)
#define DUK_DEFPROP_ATTR_WEC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)
/* Flags for duk_push_thread_raw() */

10
website/api/duk_def_prop.yaml

@ -123,27 +123,27 @@ summary: |
<td>Set or clear the 'configurable' attribute.</td>
</tr>
<tr>
<td>DUK_DEFPROP_SET_{W,E,C,WE,WC,WEC}</td>
<td>DUK_DEFPROP_SET_{W,E,C,WE,WC,EC,WEC}</td>
<td>Set one or more attributes, don't touch other attributes.</td>
</tr>
<tr>
<td>DUK_DEFPROP_CLEAR_{W,E,C,WE,WC,WEC}</td>
<td>DUK_DEFPROP_CLEAR_{W,E,C,WE,WC,EC,WEC}</td>
<td>Clear one or more attributes, don't touch other attributes.</td>
</tr>
<tr>
<td>DUK_DEFPROP_ATTR_{W,E,C,WE,WC,WEC}</td>
<td>DUK_DEFPROP_ATTR_{W,E,C,WE,WC,EC,WEC}</td>
<td>Set or clear writable, enumerable, and configurable attributes.
For example, DUK_DEFPROP_ATTR_WC sets writable and configurable,
and clears enumerable.</td>
</tr>
<tr>
<td>DUK_DEFPROP_HAVE_{W,E,C,WE,WC,WEC}</td>
<td>DUK_DEFPROP_HAVE_{W,E,C,WE,WC,EC,WEC}</td>
<td>Indicate one or more attributes are set/cleared, e.g.
DUK_DEFPROP_HAVE_WC is equivalent to
DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE.</td>
</tr>
<tr>
<td>DUK_DEFPROP_{W,E,C,WE,WC,WEC}</td>
<td>DUK_DEFPROP_{W,E,C,WE,WC,EC,WEC}</td>
<td>Provide attribute values (effective if matching "have" flag is
set), e.g. DUK_DEFPROP_WE is equivalent to
DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE.</td>

Loading…
Cancel
Save