Commit 49428c8f authored by Olivier Bertrand's avatar Olivier Bertrand

Fix compile error on LINUX (no suitable operator delete)

parent 78ccc605
......@@ -44,8 +44,8 @@ class DllExport BLOCK {
return PlugSubAlloc(g, mp, size);
} // end of new
void* operator new(size_t size, size_t mp) {
xtrc(256, "Realloc at: mp=%zd\n", mp);
void* operator new(size_t size, long long mp) {
xtrc(256, "Realloc at: mp=%lld\n", mp);
return (void*)mp;
} // end of new
......@@ -55,7 +55,7 @@ class DllExport BLOCK {
#if !defined(__BORLANDC__)
// Avoid warning C4291 by defining a matching dummy delete operator
void operator delete(void*, PGLOBAL, void *) {}
//void operator delete(void*, size_t) {}
void operator delete(void*, long long) {}
#endif
virtual ~BLOCK() {}
......
......@@ -1820,7 +1820,7 @@ PJSON SWAP::MptrJson(PJSON ojp) { // ojp is an offset
PJAR SWAP::MptrArray(PJAR ojar) {
PJAR jarp = (PJAR)MakePtr(Base, (size_t)ojar);
jarp = (PJAR)new((size_t)jarp) JARRAY(NULL);
jarp = (PJAR)new((long long)jarp) JARRAY(NULL);
if (jarp->First) {
for (int i = 0; i < jarp->Size; i++)
......@@ -1839,7 +1839,7 @@ PJAR SWAP::MptrArray(PJAR ojar) {
PJOB SWAP::MptrObject(PJOB ojob) {
PJOB jobp = (PJOB)MakePtr(Base, (size_t)ojob);
jobp = (PJOB)new((size_t)jobp) JOBJECT(NULL);
jobp = (PJOB)new((long long)jobp) JOBJECT(NULL);
if (jobp->First) {
jobp->First = (PJPR)MptrPair(jobp->First);
......@@ -1872,7 +1872,7 @@ PJPR SWAP::MptrPair(PJPR ojp) {
PJVAL SWAP::MptrJValue(PJVAL ojv) {
PJVAL jvp = (PJVAL)MakePtr(Base, (size_t)ojv);
jvp = (PJVAL)new((size_t)jvp) JVALUE(0);
jvp = (PJVAL)new((long long)jvp) JVALUE(0);
if (!jvp->Del) {
if (jvp->Jsp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment