|
|
@@ -1,12 +1,12 @@
|
|
|
/*
|
|
|
- * Duktape public API for Duktape 1.5.0.
|
|
|
+ * Duktape public API for Duktape 1.5.1.
|
|
|
*
|
|
|
* See the API reference for documentation on call semantics.
|
|
|
* The exposed API is inside the DUK_API_PUBLIC_H_INCLUDED
|
|
|
* include guard. Other parts of the header are Duktape
|
|
|
* internal and related to platform/compiler/feature detection.
|
|
|
*
|
|
|
- * Git commit 83d557704ee63f68ab40b6fcb00995c9b3d6777c (v1.5.0-dirty).
|
|
|
+ * Git commit 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e (v1.5.1-dirty).
|
|
|
* Git branch HEAD.
|
|
|
*
|
|
|
* See Duktape AUTHORS.rst and LICENSE.txt for copyright and
|
|
|
@@ -218,15 +218,15 @@ struct duk_number_list_entry {
|
|
|
* have 99 for patch level (e.g. 0.10.99 would be a development version
|
|
|
* after 0.10.0 but before the next official release).
|
|
|
*/
|
|
|
-#define DUK_VERSION 10500L
|
|
|
+#define DUK_VERSION 10501L
|
|
|
|
|
|
/* Git commit, describe, and branch for Duktape build. Useful for
|
|
|
* non-official snapshot builds so that application code can easily log
|
|
|
* which Duktape snapshot was used. Not available in the Ecmascript
|
|
|
* environment.
|
|
|
*/
|
|
|
-#define DUK_GIT_COMMIT "83d557704ee63f68ab40b6fcb00995c9b3d6777c"
|
|
|
-#define DUK_GIT_DESCRIBE "v1.5.0-dirty"
|
|
|
+#define DUK_GIT_COMMIT "2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e"
|
|
|
+#define DUK_GIT_DESCRIBE "v1.5.1-dirty"
|
|
|
#define DUK_GIT_BRANCH "HEAD"
|
|
|
|
|
|
/* Duktape debug protocol version used by this build. */
|
|
|
@@ -426,7 +426,7 @@ DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_raw(duk_context *ctx, duk_errc
|
|
|
|
|
|
#ifdef DUK_API_VARIADIC_MACROS
|
|
|
#define duk_error(ctx,err_code,...) \
|
|
|
- duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), __VA_ARGS__)
|
|
|
+ duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)
|
|
|
#else
|
|
|
DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_stash(duk_context *ctx, duk_errcode_t err_code, const char *fmt, ...));
|
|
|
/* One problem with this macro is that expressions like the following fail
|
|
|
@@ -434,14 +434,14 @@ DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_stash(duk_context *ctx, duk_er
|
|
|
* they make little sense anyway.
|
|
|
*/
|
|
|
#define duk_error \
|
|
|
- (duk_api_global_filename = (const char *) (__FILE__), \
|
|
|
- duk_api_global_line = (duk_int_t) (__LINE__), \
|
|
|
+ (duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
|
|
|
+ duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
|
|
|
duk_error_stash) /* last value is func pointer, arguments follow in parens */
|
|
|
#endif
|
|
|
|
|
|
DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_va_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap));
|
|
|
#define duk_error_va(ctx,err_code,fmt,ap) \
|
|
|
- duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), (fmt), (ap))
|
|
|
+ duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap))
|
|
|
|
|
|
/*
|
|
|
* Other state related functions
|
|
|
@@ -547,19 +547,19 @@ DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_raw(duk_context *ctx, duk_errc
|
|
|
|
|
|
#ifdef DUK_API_VARIADIC_MACROS
|
|
|
#define duk_push_error_object(ctx,err_code,...) \
|
|
|
- duk_push_error_object_raw((ctx), (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), __VA_ARGS__)
|
|
|
+ duk_push_error_object_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__)
|
|
|
#else
|
|
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_stash(duk_context *ctx, duk_errcode_t err_code, const char *fmt, ...);
|
|
|
/* Note: parentheses are required so that the comma expression works in assignments. */
|
|
|
#define duk_push_error_object \
|
|
|
- (duk_api_global_filename = (const char *) (__FILE__), \
|
|
|
- duk_api_global_line = (duk_int_t) (__LINE__), \
|
|
|
+ (duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \
|
|
|
+ duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \
|
|
|
duk_push_error_object_stash) /* last value is func pointer, arguments follow in parens */
|
|
|
#endif
|
|
|
|
|
|
DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_va_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap);
|
|
|
#define duk_push_error_object_va(ctx,err_code,fmt,ap) \
|
|
|
- duk_push_error_object_va_raw((ctx), (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), (fmt), (ap))
|
|
|
+ duk_push_error_object_va_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap))
|
|
|
|
|
|
#define DUK_BUF_FLAG_DYNAMIC (1 << 0) /* internal flag: dynamic buffer */
|
|
|
#define DUK_BUF_FLAG_EXTERNAL (1 << 1) /* internal flag: external buffer */
|