Jacek Caban : gdi32: Use get_object_type for GetObjectType implementation.
Alexandre Julliard
julliard at winehq.org
Fri Jul 2 14:46:39 CDT 2021
Module: wine
Branch: master
Commit: 7c957ec998bf9c8ba74c7180e2e90e42d8f0c185
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7c957ec998bf9c8ba74c7180e2e90e42d8f0c185
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jul 2 12:41:12 2021 +0200
gdi32: Use get_object_type for GetObjectType implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/gdiobj.c | 17 -----------------
dlls/gdi32/objects.c | 11 +++++++++++
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c
index c6eb15ce2ab..2f795a3f12f 100644
--- a/dlls/gdi32/gdiobj.c
+++ b/dlls/gdi32/gdiobj.c
@@ -1090,23 +1090,6 @@ INT WINAPI GetObjectW( HGDIOBJ handle, INT count, LPVOID buffer )
return result;
}
-/***********************************************************************
- * GetObjectType (GDI32.@)
- */
-DWORD WINAPI GetObjectType( HGDIOBJ handle )
-{
- GDI_HANDLE_ENTRY *entry;
- DWORD result = 0;
-
- EnterCriticalSection( &gdi_section );
- if ((entry = handle_entry( handle ))) result = entry->Type;
- LeaveCriticalSection( &gdi_section );
-
- TRACE("%p -> %u\n", handle, result );
- if (!result) SetLastError( ERROR_INVALID_HANDLE );
- return result;
-}
-
/***********************************************************************
* GetCurrentObject (GDI32.@)
*
diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c
index 53335fd48df..854f4783f5b 100644
--- a/dlls/gdi32/objects.c
+++ b/dlls/gdi32/objects.c
@@ -64,6 +64,17 @@ static WORD get_object_type( HGDIOBJ obj )
return entry ? entry->Type : 0;
}
+/***********************************************************************
+ * GetObjectType (GDI32.@)
+ */
+DWORD WINAPI GetObjectType( HGDIOBJ handle )
+{
+ DWORD result = get_object_type( handle );
+ TRACE("%p -> %u\n", handle, result );
+ if (!result) SetLastError( ERROR_INVALID_HANDLE );
+ return result;
+}
+
/***********************************************************************
* SelectObject (GDI32.@)
*
More information about the wine-cvs
mailing list