Removed the SEGPTR_* macros.

This commit is contained in:
Alexandre Julliard 2001-12-26 20:47:33 +00:00
parent a69c039c80
commit 966121ccd8
2 changed files with 1 additions and 25 deletions

View File

@ -2,6 +2,7 @@
#define __WINE_OLEAUT32_OLE2DISP_H #define __WINE_OLEAUT32_OLE2DISP_H
#include "wtypes.h" #include "wtypes.h"
#include "wine/windef16.h"
BSTR16 WINAPI SysAllocString16(LPCOLESTR16); BSTR16 WINAPI SysAllocString16(LPCOLESTR16);
BSTR16 WINAPI SysAllocStringLen16(const char*, int); BSTR16 WINAPI SysAllocStringLen16(const char*, int);

View File

@ -12,31 +12,6 @@
#include "winbase.h" #include "winbase.h"
#include "winnls.h" #include "winnls.h"
#include "wine/unicode.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 */ /* strdup macros */
/* DO NOT USE THEM!! they will go away soon */ /* DO NOT USE THEM!! they will go away soon */