From 2bf7633ee02a4992c5eb9f71b9f5b2de8de8fc1c Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Mon, 30 Sep 2019 00:21:52 +0300 Subject: [PATCH 1/2] Add missing DUK_DEFPROP_xxx convenience consts --- src-input/duktape.h.in | 5 +++++ website/api/duk_def_prop.yaml | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src-input/duktape.h.in b/src-input/duktape.h.in index a28d7227..4e49a74a 100644 --- a/src-input/duktape.h.in +++ b/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() */ diff --git a/website/api/duk_def_prop.yaml b/website/api/duk_def_prop.yaml index 386e3cbb..8236b045 100644 --- a/website/api/duk_def_prop.yaml +++ b/website/api/duk_def_prop.yaml @@ -123,27 +123,27 @@ summary: | Set or clear the 'configurable' attribute. - DUK_DEFPROP_SET_{W,E,C,WE,WC,WEC} + DUK_DEFPROP_SET_{W,E,C,WE,WC,EC,WEC} Set one or more attributes, don't touch other attributes. - DUK_DEFPROP_CLEAR_{W,E,C,WE,WC,WEC} + DUK_DEFPROP_CLEAR_{W,E,C,WE,WC,EC,WEC} Clear one or more attributes, don't touch other attributes. - DUK_DEFPROP_ATTR_{W,E,C,WE,WC,WEC} + DUK_DEFPROP_ATTR_{W,E,C,WE,WC,EC,WEC} Set or clear writable, enumerable, and configurable attributes. For example, DUK_DEFPROP_ATTR_WC sets writable and configurable, and clears enumerable. - DUK_DEFPROP_HAVE_{W,E,C,WE,WC,WEC} + DUK_DEFPROP_HAVE_{W,E,C,WE,WC,EC,WEC} 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. - DUK_DEFPROP_{W,E,C,WE,WC,WEC} + DUK_DEFPROP_{W,E,C,WE,WC,EC,WEC} Provide attribute values (effective if matching "have" flag is set), e.g. DUK_DEFPROP_WE is equivalent to DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE. From bc005531ece2b7dda2b25ebbb53374f9b45e394c Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Mon, 30 Sep 2019 02:33:29 +0300 Subject: [PATCH 2/2] Release: missing duk_def_prop() constants --- RELEASES.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASES.rst b/RELEASES.rst index 7e7a60a0..4d3df3e9 100644 --- a/RELEASES.rst +++ b/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)