Commit 966121cc authored by Alexandre Julliard's avatar Alexandre Julliard

Removed the SEGPTR_* macros.

parent a69c039c
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment