This commit is contained in:
hyung-hwan 2008-03-13 06:06:22 +00:00
parent 06fae5f95c
commit 655d23dc36
2 changed files with 19 additions and 2 deletions

View File

@ -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;

View File

@ -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 <ase/cmn/map.h>
#include <stdarg.h>
#if defined(__SPU__)
#include <new>
#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