Removed the SEGPTR_* macros.
This commit is contained in:
parent
a69c039c80
commit
966121ccd8
|
@ -2,6 +2,7 @@
|
|||
#define __WINE_OLEAUT32_OLE2DISP_H
|
||||
|
||||
#include "wtypes.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
BSTR16 WINAPI SysAllocString16(LPCOLESTR16);
|
||||
BSTR16 WINAPI SysAllocStringLen16(const char*, int);
|
||||
|
|
|
@ -12,31 +12,6 @@
|
|||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/windef16.h" /* for SEGPTR */
|
||||
|
||||
/* SEGPTR helper macros */
|
||||
|
||||
#define SEGPTR_ALLOC(size) \
|
||||
(HeapAlloc( GetProcessHeap(), 0, (size) ))
|
||||
#define SEGPTR_NEW(type) \
|
||||
((type *)HeapAlloc( GetProcessHeap(), 0, sizeof(type) ))
|
||||
#define SEGPTR_STRDUP_WtoA(str) \
|
||||
(HIWORD(str) ? HEAP_strdupWtoA( GetProcessHeap(), 0, (str) ) : (LPSTR)(str))
|
||||
#define SEGPTR_FREE(ptr) \
|
||||
(HIWORD(ptr) ? HeapFree( GetProcessHeap(), 0, (ptr) ) : 0)
|
||||
#define SEGPTR_GET(ptr) MapLS(ptr)
|
||||
|
||||
inline static LPSTR SEGPTR_STRDUP( LPCSTR str )
|
||||
{
|
||||
if (HIWORD(str))
|
||||
{
|
||||
INT len = strlen(str) + 1;
|
||||
LPSTR p = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
if (p) memcpy( p, str, len );
|
||||
return p;
|
||||
}
|
||||
return (LPSTR)str;
|
||||
}
|
||||
|
||||
/* strdup macros */
|
||||
/* DO NOT USE THEM!! they will go away soon */
|
||||
|
|
Loading…
Reference in New Issue