mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fix compile error on LINUX (no suitable operator delete)
This commit is contained in:
parent
78ccc605a5
commit
49428c8fa6
2 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue