summaryrefslogtreecommitdiff
path: root/src/webidl-ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/webidl-ast.c')
-rw-r--r--src/webidl-ast.c14
1 files changed, 11 insertions, 3 deletions
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";