The new Date provider snippet location is after duk_custom.h and other
overrides, so that e.g. user custom header can define
DUK_USE_DATE_NOW_GETTIMEOFDAY even if the platform detection does not.
Cast through "void *" when casting from e.g. a duk_uint8_t pointer
to a pointer with more alignment requirements (such as a struct pointer).
This is probably the best fix for cases where one also needs to do
pointer arithmetic (for which a char pointer is preferable). In cases
where pointer arithmetic is not necessarily, the original pointer could
in some cases be changed from a char pointer to a void pointer.
Add duk_pnew() API call (GH-124).
Internal implementation is a simple duk_safe_call() wrapper which is not the
optimal approach. A more direct approach would need checking of duk_new()
post processing (after duk_handle_call()) to make sure it is free of any
potential error throws (except for internal errors and the like).
Assert for NaN normalization in duk_tval macros when packed tval is in use.
This catches nasty bugs where an un-normalized NaN is written using the
duk_tval macros and later causes memory unsafe behavior.
Use global object as 'this' binding for eval calls made using the C API.
While there's no "calling context" for C code, a reasonable expectation
is that the global object is used for eval 'this' binding to match eval
behavior in Ecmascript code. See GH-164.
Fix a bug in try-finally which caused an invalid LDCONST when
(1) the function had no constants in its constant table, and
(2) there was a try-finally with no catch clause. See GH-268.
This bug is not present in v1.2.x so there's no need for a release
note item or backporting the fix.
Add a debug transport example which implements local dvalue encoding and
decoding. This is useful for users who want to decode the protocol
locally in the same process (perhaps to directly integrate with an UI or
to map the debug protocol into another protocol entirely). The example
code also illustrates how to trial parse and encode dvalues.