summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-03-22 14:48:46 (GMT)
committer Michael Drake <michael.drake@codethink.co.uk>2017-03-22 15:01:14 (GMT)
commit343df77dedb346425c40e6a364ad639c73e92527 (patch)
tree60886149887862431ad0c2c3f3229b2892e55dbb
parentcdd1f8eacafb4e8510ae06e91668b9281396e655 (diff)
downloadnsgenbind-343df77dedb346425c40e6a364ad639c73e92527.tar.gz
nsgenbind-343df77dedb346425c40e6a364ad639c73e92527.tar.bz2
Duktape 2.x: duk_safe_call callbacks now have a void ptr user data param.
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_safe_call-userdata
-rw-r--r--src/duk-libdom-interface.c4
-rw-r--r--src/duk-libdom.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index 8741815..6746348 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -747,7 +747,7 @@ output_interface_prototype(FILE* outf,
GENBIND_METHOD_TYPE_PROTOTYPE);
/* prototype definition */
- fprintf(outf, "duk_ret_t %s_%s___proto(duk_context *ctx)\n",
+ fprintf(outf, "duk_ret_t %s_%s___proto(duk_context *ctx, void *udata)\n",
DLPFX, interfacee->class_name);
fprintf(outf,"{\n");
@@ -1511,7 +1511,7 @@ int output_interface_declaration(FILE* outf, struct ir_entry *interfacee)
}
/* prototype declaration */
- fprintf(outf, "duk_ret_t %s_%s___proto(duk_context *ctx);\n",
+ fprintf(outf, "duk_ret_t %s_%s___proto(duk_context *ctx, void *udata);\n",
DLPFX, interfacee->class_name);
/* if the interface has no references (no other interface inherits from
diff --git a/src/duk-libdom.c b/src/duk-libdom.c
index bf27007..96b11d5 100644
--- a/src/duk-libdom.c
+++ b/src/duk-libdom.c
@@ -441,7 +441,7 @@ output_binding_src(struct ir *ir)
"{\n"
"\tduk_int_t ret;\n"
"\tduk_push_object(ctx);\n"
- "\tif ((ret = duk_safe_call(ctx, genproto, 1, 1)) != DUK_EXEC_SUCCESS) {\n"
+ "\tif ((ret = duk_safe_call(ctx, genproto, NULL, 1, 1)) != DUK_EXEC_SUCCESS) {\n"
"\t\tduk_pop(ctx);\n"
"\t\tLOG(\"Failed to register prototype for %%s\", proto_name + 2);\n"
"\t\treturn ret;\n"