mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
win32/vmem.h: White-space only
Make this macro more legible, while silencing some compiler warnings about the if statements looking like they are intended to apply to more than they actually do.
This commit is contained in:
parent
ee1d728d6e
commit
02bc12fb95
49
win32/vmem.h
49
win32/vmem.h
@ -61,28 +61,33 @@ inline void MEMODSlx(char *str, long x)
|
||||
Even though perl links with ucrtbase.dll, there is alot of overhead for
|
||||
using ::new() operator. Just implement our own ::new(), more C-style. */
|
||||
#define VMEM_H_NEW_OP \
|
||||
void* operator new(size_t size) noexcept { \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
|
||||
void* operator new[](size_t size) noexcept { \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
|
||||
void* operator new( size_t size, int block_use, \
|
||||
char const* file_name, int line_number) noexcept { \
|
||||
UNREFERENCED_PARAMETER(block_use); \
|
||||
UNREFERENCED_PARAMETER(file_name); \
|
||||
UNREFERENCED_PARAMETER(line_number); \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; \
|
||||
}; \
|
||||
void* operator new[]( size_t size, int block_use, \
|
||||
char const* file_name, int line_number) noexcept { \
|
||||
UNREFERENCED_PARAMETER(block_use); \
|
||||
UNREFERENCED_PARAMETER(file_name); \
|
||||
UNREFERENCED_PARAMETER(line_number); \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); return p; }; \
|
||||
void operator delete (void* p) noexcept { win32_free(p); return; }; \
|
||||
void* operator new(size_t size) noexcept { \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if (!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
|
||||
return p; \
|
||||
}; \
|
||||
void* operator new[](size_t size) noexcept { \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if (!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
|
||||
return p; }; \
|
||||
void* operator new( size_t size, int block_use, \
|
||||
char const* file_name, int line_number) noexcept {\
|
||||
UNREFERENCED_PARAMETER(block_use); \
|
||||
UNREFERENCED_PARAMETER(file_name); \
|
||||
UNREFERENCED_PARAMETER(line_number); \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
|
||||
return p; \
|
||||
}; \
|
||||
void* operator new[]( size_t size, int block_use, \
|
||||
char const* file_name, int line_number) noexcept {\
|
||||
UNREFERENCED_PARAMETER(block_use); \
|
||||
UNREFERENCED_PARAMETER(file_name); \
|
||||
UNREFERENCED_PARAMETER(line_number); \
|
||||
void * p = (void*)win32_malloc(size); \
|
||||
if(!p) noperl_die("%s%s","Out of memory in perl:", "???"); \
|
||||
return p; }; \
|
||||
void operator delete (void* p) noexcept { win32_free(p); return; }; \
|
||||
void operator delete[] (void* p) noexcept { win32_free(p); return; }
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user