kernel32: Deconstify a variable
Andrew Talbot
andrew.talbot at talbotville.com
Sun Mar 15 06:03:13 CDT 2009
AFAICT, MapLS() does not take a pointer to const.
-- Andy.
---
Changelog:
kernel32: Deconstify a variable.
diff --git a/dlls/kernel32/selector.c b/dlls/kernel32/selector.c
index c8841b1..37e2778 100644
--- a/dlls/kernel32/selector.c
+++ b/dlls/kernel32/selector.c
@@ -474,15 +474,15 @@ static struct mapls_entry *first_entry;
*
* Maps linear pointer to segmented.
*/
-SEGPTR WINAPI MapLS( LPCVOID ptr )
+SEGPTR WINAPI MapLS( LPVOID ptr )
{
struct mapls_entry *entry, *free = NULL;
- const void *base;
+ void *base;
SEGPTR ret = 0;
if (!HIWORD(ptr)) return (SEGPTR)LOWORD(ptr);
- base = (const char *)ptr - ((ULONG_PTR)ptr & 0x7fff);
+ base = (char *)ptr - ((ULONG_PTR)ptr & 0x7fff);
HeapLock( GetProcessHeap() );
for (entry = first_entry; entry; entry = entry->next)
{
@@ -509,7 +509,7 @@ SEGPTR WINAPI MapLS( LPCVOID ptr )
entry = free;
}
entry->count++;
- ret = MAKESEGPTR( entry->sel, (const char *)ptr - (char *)entry->addr );
+ ret = MAKESEGPTR( entry->sel, (char *)ptr - (char *)entry->addr );
done:
HeapUnlock( GetProcessHeap() );
return ret;
diff --git a/include/winbase.h b/include/winbase.h
index 3f0a24e..c8b26fe 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2297,7 +2297,7 @@ WINBASEAPI void WINAPI DisposeLZ32Handle(HANDLE);
WINBASEAPI HANDLE WINAPI DosFileHandleToWin32Handle(HFILE);
WINBASEAPI DWORD WINAPI GetProcessDword(DWORD,INT);
WINBASEAPI VOID WINAPI GetpWin16Lock(SYSLEVEL**);
-WINBASEAPI DWORD WINAPI MapLS(LPCVOID);
+WINBASEAPI DWORD WINAPI MapLS(LPVOID);
WINBASEAPI LPVOID WINAPI MapSL(DWORD);
WINBASEAPI VOID WINAPI ReleaseThunkLock(DWORD*);
WINBASEAPI VOID WINAPI RestoreThunkLock(DWORD);
More information about the wine-patches
mailing list