From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- tools/widl/typetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index ee71a7a2899..e867ea4d26f 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -212,6 +212,7 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t { case TYPE_BASIC_INT: case TYPE_BASIC_INT32: + case TYPE_BASIC_LONG: n += strappend(buf, len, pos + n, type_basic_get_sign(type) <= 0 ? "i4" : "u4"); return n; case TYPE_BASIC_INT64: @@ -232,7 +233,6 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t return n; case TYPE_BASIC_INT16: case TYPE_BASIC_INT3264: - case TYPE_BASIC_LONG: case TYPE_BASIC_CHAR: case TYPE_BASIC_HYPER: case TYPE_BASIC_WCHAR:
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- tools/widl/typetree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index e867ea4d26f..290f9fffeb5 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -210,6 +210,9 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t case TYPE_BASIC: switch (type_basic_get_type(type)) { + case TYPE_BASIC_INT16: + n += strappend(buf, len, pos + n, type_basic_get_sign(type) <= 0 ? "i2" : "u2"); + return n; case TYPE_BASIC_INT: case TYPE_BASIC_INT32: case TYPE_BASIC_LONG: @@ -231,7 +234,6 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t case TYPE_BASIC_BYTE: n += strappend(buf, len, pos + n, "u1"); return n; - case TYPE_BASIC_INT16: case TYPE_BASIC_INT3264: case TYPE_BASIC_CHAR: case TYPE_BASIC_HYPER:
From: Rémi Bernon rbernon@codeweavers.com
--- tools/widl/typetree.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 290f9fffeb5..87ab7d2134c 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -198,6 +198,7 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t return n; case TYPE_ALIAS: if (!strcmp(type->name, "boolean")) n += strappend(buf, len, pos + n, "b1"); + else if (!strcmp(type->name, "GUID")) n += strappend(buf, len, pos + n, "g16"); else if (!strcmp(type->name, "HSTRING")) n += strappend(buf, len, pos + n, "string"); else n += append_type_signature(buf, len, pos + n, type->details.alias.aliasee.type); return n;
Can confirm this enables `windows.perception.spatial.surfaces.idl` to compile.
This merge request was approved by Mohamad Al-Jaf.
On Wed Mar 1 07:36:40 2023 +0000, Mohamad Al-Jaf wrote:
Can confirm this enables `windows.perception.spatial.surfaces.idl` to compile.
Thanks, for the record it's not only about allowing it to build, we need to have the correct strings to generate the right parameterized interface guids.
It can be difficult when they aren't documented, some were only found thanks to lucky guesses, and I struggled at first with the guid one, only to find out that Microsoft recently updated their documentation and now mention it, as well as "string" (https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-system#guid-gene...)
On Wed Mar 1 07:36:40 2023 +0000, Rémi Bernon wrote:
Thanks, for the record it's not only about allowing it to build, we need to have the correct strings to generate the right parameterized interface guids. It can be difficult when they aren't documented, some were only found thanks to lucky guesses, and I struggled at first with the guid one, only to find out that Microsoft recently updated their documentation and now mention it, as well as "string" (https://learn.microsoft.com/en-us/uwp/winrt-cref/winrt-type-system#guid-gene...)
@rbernon, note that you should explicitly approve this as it contains commits from another author.
This merge request was approved by Rémi Bernon.