Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions del_opv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <new>
#include <cstdlib>
#include <func_exception>

// Arduino now defines this.
//_UCXXEXPORT void operator delete[](void * ptr) throw(){
// free(ptr);
//}
_UCXXEXPORT void operator delete[](void * ptr) throw(){
free(ptr);
}

#endif
6 changes: 3 additions & 3 deletions new_opv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <new>
#include <cstdlib>
#include <func_exception>


// 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:
Expand All @@ -36,4 +35,5 @@ _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){
}
return p;
}

#endif