[PATCH] widl: Support basic char type

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Mar 3 03:46:53 CST 2022


Hi Remi,

Attached are the next two in the series that requires this one.

Maybe its the BYTE, that getting translated into to wrong type somewhere.

Regards
Alistair

On 3/3/22 20:20, Rémi Bernon wrote:
> On 3/3/22 08:09, Alistair Leslie-Hughes wrote:
>> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.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 dc4db35e835..aa8c302c064 100644
>> --- a/tools/widl/typetree.c
>> +++ b/tools/widl/typetree.c
>> @@ -226,10 +226,12 @@ static size_t append_type_signature(char **buf, 
>> size_t *len, size_t pos, type_t
>>           case TYPE_BASIC_DOUBLE:
>>               n += strappend(buf, len, pos + n, "f8");
>>               return n;
>> +        case TYPE_BASIC_CHAR:
>> +            n += strappend(buf, len, pos + n, 
>> type_basic_get_sign(type) <= 0 ? "i1" : "u1");
>> +            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_BYTE:
>>           case TYPE_BASIC_WCHAR:
> 
> Is this required for something specifically? I couldn't find any 
> indication in the specification [1] how these would translate in the 
> signatures.
> 
> [1] 
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fuwp%2Fwinrt-cref%2Fwinrt-type-system&data=04%7C01%7C%7C776a41056d8846cc109b08d9fcf70ecd%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637818960334670991%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yf209HoYvSj3mA75UIi4TY7xX4qmh6cubruSG1UKa%2Bs%3D&reserved=0 
> 
-------------- next part --------------
From 394a1cc877bbc2ecbb3efc197aa67a290c4c84f5 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Thu, 3 Mar 2022 12:47:55 +1100
Subject: [PATCH] include: Add IReference<T> support

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 include/windows.foundation.collections.idl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl
index 7576f331172..dc75ac1a4db 100644
--- a/include/windows.foundation.collections.idl
+++ b/include/windows.foundation.collections.idl
@@ -73,6 +73,15 @@ cpp_quote("#endif")
         ]
         delegate HRESULT TypedEventHandler<TSender, TArgs>([in] TSender sender, [in] TArgs args);
 
+        [
+            contract(Windows.Foundation.FoundationContract, 1.0),
+            uuid(61c17706-2d65-11e0-9ae8-d48564015472)
+        ]
+        interface IReference<T> : IInspectable
+        {
+            [propget] HRESULT value(T *value);
+        }
+
         namespace Collections
         {
             [
-- 
2.34.1

-------------- next part --------------
From af5e7bb2cd9679e80d6b2b691f50be432077a154 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Thu, 3 Mar 2022 12:48:33 +1100
Subject: [PATCH] include: Add IReference<BYTE> interface reference

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 include/windows.foundation.idl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 50e134d3900..446bbb3a86c 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -160,6 +160,7 @@ namespace Windows {
         declare {
             interface Windows.Foundation.Collections.IIterable<HSTRING>;
             interface Windows.Foundation.Collections.IIterator<HSTRING>;
+            interface Windows.Foundation.Collections.IVectorView<BYTE>;
             interface Windows.Foundation.Collections.IVectorView<HSTRING>;
             interface Windows.Foundation.Collections.IVectorView<IInspectable *>;
             interface Windows.Foundation.Collections.IVector<HSTRING>;
@@ -167,6 +168,7 @@ namespace Windows {
             interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING>*>;
             interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
             interface Windows.Foundation.IAsyncOperation<boolean>;
+            interface Windows.Foundation.IReference<BYTE>;
         }
     }
 }
-- 
2.34.1



More information about the wine-devel mailing list