From 58aa5946574dd8d081e7b992391f36521a5ceef3 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Tue, 21 Jan 2014 14:20:16 +0000 Subject: [PATCH 1/2] Check arduino version --- del_opv.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/del_opv.cpp b/del_opv.cpp index 750765f..01ad5da 100644 --- a/del_opv.cpp +++ b/del_opv.cpp @@ -16,12 +16,15 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Arduino 1.04 contains an implementation for this. +#if ARDUINO < 104 #include #include #include -// Arduino now defines this. -//_UCXXEXPORT void operator delete[](void * ptr) throw(){ -// free(ptr); -//} +_UCXXEXPORT void operator delete[](void * ptr) throw(){ + free(ptr); +} + +#endif From 5e299d78c672b0952aa2dceb8dd00575b1ed19d2 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Tue, 21 Jan 2014 14:20:58 +0000 Subject: [PATCH 2/2] Check arduino version --- new_opv.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/new_opv.cpp b/new_opv.cpp index 07976a5..9093efa 100644 --- a/new_opv.cpp +++ b/new_opv.cpp @@ -16,14 +16,13 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Arduino 1.04 contains an implementation for this. +#if ARDUINO < 104 #include #include #include - -// Arduino now defines this -#if 0 _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ //C++ stardard 5.3.4.8 requires that a valid pointer be returned for //a call to new(0). Thus: @@ -36,4 +35,5 @@ _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ } return p; } + #endif