diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-10-24 21:08:56 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-10-24 21:08:56 +0100 |
commit | 2c193d1fa01e116d7cdb1b5dd0f3cd8497bf7ef6 (patch) | |
tree | 821c06d3fa369971a4dc2f4edb827ebd656ea8d4 /src/webidl-ast.c | |
parent | 0f8a9def0c9480c884da9c3021f55a8e30324e45 (diff) | |
download | nsgenbind-2c193d1fa01e116d7cdb1b5dd0f3cd8497bf7ef6.tar.gz nsgenbind-2c193d1fa01e116d7cdb1b5dd0f3cd8497bf7ef6.tar.bz2 |
improve unimplemented warning to include type modifier
Diffstat (limited to 'src/webidl-ast.c')
-rw-r--r-- | src/webidl-ast.c | 14 |
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"; |