summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/duk-libdom-interface.c7
-rw-r--r--src/webidl-ast.c14
-rw-r--r--src/webidl-ast.h2
3 files changed, 16 insertions, 7 deletions
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index a57c520..77a58b0 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -1316,7 +1316,8 @@ output_attribute_getter(FILE* outf,
"Unimplemented: getter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->base_type));
+ webidl_type_to_str(atributee->type_modifier,
+ atributee->base_type));
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
@@ -1472,8 +1473,8 @@ output_attribute_setter(FILE* outf,
"Unimplemented: setter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->base_type));
-
+ webidl_type_to_str(atributee->type_modifier,
+ atributee->base_type));
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
}
diff --git a/src/webidl-ast.c b/src/webidl-ast.c
index 08a8dcc..253a3ba 100644
--- a/src/webidl-ast.c
+++ b/src/webidl-ast.c
@@ -685,7 +685,7 @@ int webidl_intercalate_implements(struct webidl_node *webidl_ast)
}
/* exported interface defined in webidl-ast.h */
-const char *webidl_type_to_str(enum webidl_type t)
+const char *webidl_type_to_str(enum webidl_type_modifier m, enum webidl_type t)
{
switch (t) {
case WEBIDL_TYPE_ANY: /**< 0 - The type is unconstrained */
@@ -710,10 +710,18 @@ const char *webidl_type_to_str(enum webidl_type t)
return "double";
case WEBIDL_TYPE_SHORT: /**< 7 - The type is a signed 16bit */
- return "short";
+ if (m == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ return "unsigned short";
+ } else {
+ return "short";
+ }
case WEBIDL_TYPE_LONG: /**< 8 - The type is a signed 32bit */
- return "long";
+ if (m == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ return "unsigned long";
+ } else {
+ return "long";
+ }
case WEBIDL_TYPE_LONGLONG: /**< 9 - The type is a signed 64bit */
return "long long";
diff --git a/src/webidl-ast.h b/src/webidl-ast.h
index 0a8079b..bd9b313 100644
--- a/src/webidl-ast.h
+++ b/src/webidl-ast.h
@@ -166,6 +166,6 @@ int webidl_fprintf(FILE *stream, const char *format, ...);
/**
* get string of argument type
*/
-const char *webidl_type_to_str(enum webidl_type t);
+const char *webidl_type_to_str(enum webidl_type_modifier m, enum webidl_type t);
#endif