diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-09-07 11:28:08 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-09-07 11:28:08 +0100 |
commit | 5b0ac4502fd4407d51c165e0ea4ef814b3253fa9 (patch) | |
tree | 64b1b252766c4f7ff768a1735ca1cb7a74c40fa2 /src/duk-libdom.c | |
parent | 83956295f66576becbf5de8cef915cd0d54f409b (diff) | |
download | nsgenbind-5b0ac4502fd4407d51c165e0ea4ef814b3253fa9.tar.gz nsgenbind-5b0ac4502fd4407d51c165e0ea4ef814b3253fa9.tar.bz2 |
Cause string arguments to operations to be coerced.
It appears that string parameters to operations must be coerced from
other types instead of throwing a type error to conform to expected
behaviour.
Diffstat (limited to 'src/duk-libdom.c')
-rw-r--r-- | src/duk-libdom.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/duk-libdom.c b/src/duk-libdom.c index f72bc96..084a68f 100644 --- a/src/duk-libdom.c +++ b/src/duk-libdom.c @@ -372,13 +372,12 @@ output_binding_header(struct ir *ir) fprintf(bindf, "/* Constant strings */\n" "extern const char *%s_error_fmt_argument;\n" - "extern const char *%s_error_fmt_string_type;\n" "extern const char *%s_error_fmt_bool_type;\n" "extern const char *%s_error_fmt_number_type;\n" "extern const char *%s_magic_string_private;\n" "extern const char *%s_magic_string_prototypes;\n" "\n", - DLPFX, DLPFX, DLPFX, DLPFX, DLPFX, DLPFX); + DLPFX, DLPFX, DLPFX, DLPFX, DLPFX); fprintf(bindf, "duk_bool_t %s_instanceof(duk_context *ctx, const char *klass);\n", @@ -434,10 +433,9 @@ output_binding_src(struct ir *ir) fprintf(bindf, "/* Error format strings */\n" "const char *%s_error_fmt_argument =\"%%d argument required, but ony %%d present.\";\n" - "const char *%s_error_fmt_string_type =\"argument %%d (%%s) requires a string\";\n" "const char *%s_error_fmt_bool_type =\"argument %%d (%%s) requires a bool\";\n" "const char *%s_error_fmt_number_type =\"argument %%d (%%s) requires a number\";\n", - DLPFX, DLPFX, DLPFX, DLPFX); + DLPFX, DLPFX, DLPFX); fprintf(bindf, "\n"); |