"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/kernel32/heap.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

heap.c  (wine-5.12.tar.xz):heap.c  (wine-5.13.tar.xz)
skipping to change at line 328 skipping to change at line 328
if (!((ULONG_PTR)hmem >> 16)) if (!((ULONG_PTR)hmem >> 16))
{ {
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return 0; return 0;
} }
if(ISPOINTER(hmem)) if(ISPOINTER(hmem))
{ {
retval=HeapSize(GetProcessHeap(), 0, hmem); retval=HeapSize(GetProcessHeap(), 0, hmem);
if (retval == ~0ul) /* It might be a GMEM_MOVEABLE data pointer */ if (retval == ~(SIZE_T)0) /* It might be a GMEM_MOVEABLE data pointer */
{ {
retval = HeapSize(GetProcessHeap(), 0, (char*)hmem - HGLOBAL_STORAGE); retval = HeapSize(GetProcessHeap(), 0, (char*)hmem - HGLOBAL_STORAGE);
if (retval != ~0ul) retval -= HGLOBAL_STORAGE; if (retval != ~(SIZE_T)0) retval -= HGLOBAL_STORAGE;
} }
} }
else else
{ {
RtlLockHeap(GetProcessHeap()); RtlLockHeap(GetProcessHeap());
pintern=HANDLE_TO_INTERN(hmem); pintern=HANDLE_TO_INTERN(hmem);
if(pintern->Magic==MAGIC_GLOBAL_USED) if(pintern->Magic==MAGIC_GLOBAL_USED)
{ {
if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */ if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */
retval = 0; retval = 0;
else else
{ {
retval = HeapSize(GetProcessHeap(), 0, (char *)pintern->Pointer - H GLOBAL_STORAGE ); retval = HeapSize(GetProcessHeap(), 0, (char *)pintern->Pointer - H GLOBAL_STORAGE );
if (retval != ~0ul) retval -= HGLOBAL_STORAGE; if (retval != ~(SIZE_T)0) retval -= HGLOBAL_STORAGE;
} }
} }
else else
{ {
WARN("invalid handle %p (Magic: 0x%04x)\n", hmem, pintern->Magic); WARN("invalid handle %p (Magic: 0x%04x)\n", hmem, pintern->Magic);
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
retval=0; retval=0;
} }
RtlUnlockHeap(GetProcessHeap()); RtlUnlockHeap(GetProcessHeap());
} }
if (retval == ~0ul) retval = 0; if (retval == ~(SIZE_T)0) retval = 0;
return retval; return retval;
} }
/*********************************************************************** /***********************************************************************
* GlobalWire (KERNEL32.@) * GlobalWire (KERNEL32.@)
*/ */
LPVOID WINAPI GlobalWire(HGLOBAL hmem) LPVOID WINAPI GlobalWire(HGLOBAL hmem)
{ {
return GlobalLock( hmem ); return GlobalLock( hmem );
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)