]> git.cworth.org Git - apitrace/blobdiff - specs/winapi.py
Cleanup strings constness.
[apitrace] / specs / winapi.py
index 409054d12775fb333bcd469407f2af6308a4e96c..23d6419f36bab0051f025a30f3b195d32233333c 100644 (file)
@@ -51,6 +51,7 @@ BYTE = Alias("BYTE", UInt8)
 WORD = Alias("WORD", UInt16)
 DWORD = Alias("DWORD", UInt32)
 
+UCHAR = Alias("UCHAR", UChar)
 WCHAR = Alias("WCHAR", Short)
 
 BOOL = Enum("BOOL", [
@@ -64,9 +65,9 @@ LPDWORD = Pointer(DWORD)
 LPBOOL = Pointer(BOOL)
 
 LPSTR = CString
-LPCSTR = Const(CString)
+LPCSTR = ConstCString
 LPWSTR = WString
-LPCWSTR = Const(WString)
+LPCWSTR = ConstWString
 
 LARGE_INTEGER = Struct("LARGE_INTEGER", [
     (LONGLONG, 'QuadPart'),
@@ -77,6 +78,7 @@ SIZE_T = Alias("SIZE_T", SizeT)
 VOID = Void
 PVOID = OpaquePointer(VOID)
 LPVOID = PVOID
+LPCVOID = OpaquePointer(Const(VOID))
 
 def DECLARE_HANDLE(expr):
     return Handle(expr, IntPointer(expr))
@@ -203,9 +205,9 @@ HRESULT = MAKE_HRESULT([])
 IUnknown = Interface("IUnknown")
 
 IUnknown.methods = (
-       Method(HRESULT, "QueryInterface", ((REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppvObj"))),
-       Method(ULONG, "AddRef", (), sideeffects=False),
-       Method(ULONG, "Release", ()),
+       StdMethod(HRESULT, "QueryInterface", ((REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppvObj"))),
+       StdMethod(ULONG, "AddRef", (), sideeffects=False),
+       StdMethod(ULONG, "Release", ()),
 )