diff --git a/ase/awk/Awk.cpp b/ase/awk/Awk.cpp index 2a7681a0..dab50231 100644 --- a/ase/awk/Awk.cpp +++ b/ase/awk/Awk.cpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.cpp 115 2008-03-03 11:13:15Z baconevi $ + * $Id: Awk.cpp 123 2008-03-12 12:06:22Z baconevi $ * * {License} */ @@ -230,7 +230,11 @@ void Awk::Argument::clear () this->inum = 0; } +#if defined(__SPU__) +void* Awk::Argument::operator new (std::size_t n, awk_t* awk) throw () +#else void* Awk::Argument::operator new (size_t n, awk_t* awk) throw () +#endif { void* ptr = ase_awk_malloc (awk, ASE_SIZEOF(awk) + n); if (ptr == ASE_NULL) return ASE_NULL; @@ -239,7 +243,11 @@ void* Awk::Argument::operator new (size_t n, awk_t* awk) throw () return (char*)ptr+ASE_SIZEOF(awk); } +#if defined(__SPU__) +void* Awk::Argument::operator new[] (std::size_t n, awk_t* awk) throw () +#else void* Awk::Argument::operator new[] (size_t n, awk_t* awk) throw () +#endif { void* ptr = ase_awk_malloc (awk, ASE_SIZEOF(awk) + n); if (ptr == ASE_NULL) return ASE_NULL; diff --git a/ase/awk/Awk.hpp b/ase/awk/Awk.hpp index 3f94259c..b588d3ce 100644 --- a/ase/awk/Awk.hpp +++ b/ase/awk/Awk.hpp @@ -1,5 +1,5 @@ /* - * $Id: Awk.hpp 115 2008-03-03 11:13:15Z baconevi $ + * $Id: Awk.hpp 123 2008-03-12 12:06:22Z baconevi $ * * {License} */ @@ -11,6 +11,10 @@ #include #include +#if defined(__SPU__) +#include +#endif + ///////////////////////////////// ASE_BEGIN_NAMESPACE(ASE) ///////////////////////////////// @@ -307,8 +311,13 @@ public: public: // initialization + #if defined(__SPU__) + void* operator new (std::size_t n, awk_t* awk) throw (); + void* operator new[] (std::size_t n, awk_t* awk) throw (); + #else void* operator new (size_t n, awk_t* awk) throw (); void* operator new[] (size_t n, awk_t* awk) throw (); + #endif #if !defined(__BORLANDC__) // deletion when initialization fails