From 6291374b3511d0bf324ba1aeff9d5f507906badd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 22 Aug 2014 00:41:32 -0700 Subject: [PATCH] Move rtti hacks. --- sourcepawn/compiler/pawncc.cpp | 27 +++++++++++++++++++++++++++ sourcepawn/compiler/sp_symhash.cpp | 26 -------------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/sourcepawn/compiler/pawncc.cpp b/sourcepawn/compiler/pawncc.cpp index e81cfbb2..b7332c07 100644 --- a/sourcepawn/compiler/pawncc.cpp +++ b/sourcepawn/compiler/pawncc.cpp @@ -553,3 +553,30 @@ extern "C" void sp_fdbg_ntv_hook(int index, symbol *sym) native->ret_tag = sym->tag; } + + +#if defined __linux__ || defined __APPLE__ +extern "C" void __cxa_pure_virtual(void) +{ +} + +void *operator new(size_t size) +{ + return malloc(size); +} + +void *operator new[](size_t size) +{ + return malloc(size); +} + +void operator delete(void *ptr) +{ + free(ptr); +} + +void operator delete[](void * ptr) +{ + free(ptr); +} +#endif diff --git a/sourcepawn/compiler/sp_symhash.cpp b/sourcepawn/compiler/sp_symhash.cpp index 9664d553..fd27c452 100644 --- a/sourcepawn/compiler/sp_symhash.cpp +++ b/sourcepawn/compiler/sp_symhash.cpp @@ -128,29 +128,3 @@ RemoveFromHashTable(HashTable *ht, symbol *sym) assert(r.found()); ht->remove(r); } - -#if defined __linux__ || defined __APPLE__ -extern "C" void __cxa_pure_virtual(void) -{ -} - -void *operator new(size_t size) -{ - return malloc(size); -} - -void *operator new[](size_t size) -{ - return malloc(size); -} - -void operator delete(void *ptr) -{ - free(ptr); -} - -void operator delete[](void * ptr) -{ - free(ptr); -} -#endif