2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Get rid of DEL() and FREE() macros.

Part of CoreLibExe must die.
This commit is contained in:
Darryl Pogue
2011-10-23 20:52:33 -07:00
committed by Adam Johnson
parent be26b145df
commit 8a3f0cfd5b
88 changed files with 262 additions and 265 deletions

View File

@ -137,5 +137,5 @@ void cyAccountManagement::ChangePassword(const char* password)
{
wchar_t* wpassword = StrDupToUnicode(password);
NetCommChangeMyPassword(wpassword);
FREE(wpassword);
free(wpassword);
}

View File

@ -259,7 +259,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSendRTChat, args, "Params: fromPlayer,toPlayer
wchar_t* msg = TRACKED_NEW wchar_t[size + 1]; msg[size] = 0;
PyUnicode_AsWideChar((PyUnicodeObject*)message, msg, size);
uint32_t retval = cyMisc::SendRTChat(*fromPlayer, toPlayerList, msg, msgFlags);
DEL(msg);
delete msg;
return PyLong_FromUnsignedLong(retval);
}
else
@ -553,4 +553,4 @@ void cyMisc::AddPlasmaMethods(std::vector<PyMethodDef> &methods)
AddPlasmaMethods2(methods);
AddPlasmaMethods3(methods);
AddPlasmaMethods4(methods);
}
}

View File

@ -220,8 +220,8 @@ void pyAgeVault::AddChronicleEntry( const char * name, uint32_t type, const char
VaultAddAgeChronicleEntry(wEntryName, type, wEntryValue);
FREE(wEntryName);
FREE(wEntryValue);
free(wEntryName);
free(wEntryValue);
}
// AGE DEVICES. AKA IMAGERS, WHATEVER.
@ -311,7 +311,7 @@ PyObject * pyAgeVault::GetAgeSDL() const
{
plStateDataRecord * rec = NEWZERO(plStateDataRecord);
if (!VaultAgeGetAgeSDL(rec)) {
DEL(rec);
delete rec;
PYTHON_RETURN_NONE;
}
else {

View File

@ -51,7 +51,7 @@ pyDniInfoSource::pyDniInfoSource()
{}
pyDniInfoSource::~pyDniInfoSource() {
FREE(fAgeName);
free(fAgeName);
}
PyObject* pyDniInfoSource::GetAgeCoords( void )

View File

@ -56,7 +56,7 @@ pySDLStateDataRecord::pySDLStateDataRecord( plStateDataRecord * rec )
}
pySDLStateDataRecord::~pySDLStateDataRecord() {
DEL(fRec);
delete fRec;
}
plStateDataRecord * pySDLStateDataRecord::GetRec() const

View File

@ -369,8 +369,8 @@ void pyVault::AddChronicleEntry( const char * name, uint32_t type, const char *
// Maybe we should insert a dummy into the tree? (currently hard)
VaultAddChronicleEntryAndWait(wEntryName, type, wEntryValue);
FREE(wEntryName);
FREE(wEntryValue);
free(wEntryName);
free(wEntryValue);
}
@ -452,7 +452,7 @@ PyObject* pyVault::GetPsnlAgeSDL() const
if (sdl.GetStateDataRecord(rec, plSDL::kKeepDirty))
result = pySDLStateDataRecord::New(rec);
else
DEL(rec);
delete rec;
rvnSdl->DecRef();
}
rvnInfo->DecRef();

View File

@ -70,8 +70,8 @@ pyVaultChronicleNode::pyVaultChronicleNode(int n)
}
pyVaultChronicleNode::~pyVaultChronicleNode () {
FREE(ansiName);
FREE(ansiValue);
free(ansiName);
free(ansiValue);
}
@ -86,7 +86,7 @@ void pyVaultChronicleNode::Chronicle_SetName( const char * text )
wchar_t * wStr = StrDupToUnicode(text);
VaultChronicleNode chron(fNode);
chron.SetEntryName(wStr);
FREE(wStr);
free(wStr);
}
const char * pyVaultChronicleNode::Chronicle_GetName( void )
@ -94,7 +94,7 @@ const char * pyVaultChronicleNode::Chronicle_GetName( void )
if (!fNode)
return "";
FREE(ansiName);
free(ansiName);
VaultChronicleNode chron(fNode);
ansiName = StrDupToAnsi(chron.entryName);
@ -109,7 +109,7 @@ void pyVaultChronicleNode::Chronicle_SetValue( const char * text )
wchar_t * wStr = StrDupToUnicode(text);
VaultChronicleNode chron(fNode);
chron.SetEntryValue(wStr);
FREE(wStr);
free(wStr);
}
const char * pyVaultChronicleNode::Chronicle_GetValue( void )
@ -117,7 +117,7 @@ const char * pyVaultChronicleNode::Chronicle_GetValue( void )
if (!fNode)
return "";
FREE(ansiValue);
free(ansiValue);
ansiValue = nil;
VaultChronicleNode chron(fNode);

View File

@ -245,7 +245,7 @@ void pyVaultImageNode::SetImageFromScrShot()
else {
access.SetImageData(nil, 0);
access.SetImageType(VaultImageNode::kNone);
DEL(fMipmap);
delete fMipmap;
fMipmap = nil;
}
}

View File

@ -154,7 +154,7 @@ void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationComplete( uint32_t
}
}
DEL(this); // commit hara-kiri
delete this; // commit hara-kiri
}
void pyVaultNode::pyVaultNodeOperationCallback::SetNode (RelVaultNode * rvn) {
@ -191,8 +191,8 @@ pyVaultNode::~pyVaultNode()
{
if (fNode)
fNode->DecRef("pyVaultNode");
FREE(fCreateAgeGuid);
FREE(fCreateAgeName);
free(fCreateAgeGuid);
free(fCreateAgeName);
}
@ -335,7 +335,7 @@ const char * pyVaultNode::GetCreateAgeGuid( void )
return fCreateAgeGuid;
if (fNode) {
fCreateAgeGuid = (char*)ALLOC(64);
fCreateAgeGuid = (char*)malloc(64);
GuidToString(fNode->createAgeUuid, fCreateAgeGuid, 64);
}
@ -383,7 +383,7 @@ void pyVaultNode::SetCreatorNodeID( uint32_t v )
void pyVaultNode::SetCreateAgeName( const char * v )
{
FREE(fCreateAgeName);
free(fCreateAgeName);
fCreateAgeName = nil;
ASSERT(fNode);
@ -394,7 +394,7 @@ void pyVaultNode::SetCreateAgeName( const char * v )
void pyVaultNode::SetCreateAgeGuid( const char * v )
{
FREE(fCreateAgeGuid);
free(fCreateAgeGuid);
fCreateAgeGuid = nil;
ASSERT(fNode);

View File

@ -70,8 +70,8 @@ pyVaultPlayerInfoNode::pyVaultPlayerInfoNode()
}
pyVaultPlayerInfoNode::~pyVaultPlayerInfoNode () {
FREE(ansiPlayerName);
FREE(ansiAgeInstName);
free(ansiPlayerName);
free(ansiAgeInstName);
}
//==================================================================
@ -103,7 +103,7 @@ void pyVaultPlayerInfoNode::Player_SetPlayerName( const char * name )
wchar_t * wStr = StrDupToUnicode(name);
VaultPlayerInfoNode playerInfo(fNode);
playerInfo.SetPlayerName(wStr);
FREE(wStr);
free(wStr);
}
const char * pyVaultPlayerInfoNode::Player_GetPlayerName( void )
@ -115,7 +115,7 @@ const char * pyVaultPlayerInfoNode::Player_GetPlayerName( void )
if (!playerInfo.playerName)
return "";
FREE(ansiPlayerName);
free(ansiPlayerName);
ansiPlayerName = StrDupToAnsi(playerInfo.playerName);
return ansiPlayerName;
}
@ -129,7 +129,7 @@ void pyVaultPlayerInfoNode::Player_SetAgeInstanceName( const char * agename )
wchar_t * wStr = StrDupToUnicode(agename);
VaultPlayerInfoNode playerInfo(fNode);
playerInfo.SetAgeInstName(wStr);
FREE(wStr);
free(wStr);
}
const char * pyVaultPlayerInfoNode::Player_GetAgeInstanceName( void )
@ -141,7 +141,7 @@ const char * pyVaultPlayerInfoNode::Player_GetAgeInstanceName( void )
if (!playerInfo.ageInstName)
return "";
FREE(ansiAgeInstName);
free(ansiAgeInstName);
ansiAgeInstName = StrDupToAnsi(playerInfo.ageInstName);
return ansiAgeInstName;
}

View File

@ -189,7 +189,7 @@ PyObject *pyVaultPlayerNode::GetLinkToMyNeighborhood()
return result;
}
DEL(link);
delete link;
PYTHON_RETURN_NONE;
}
@ -202,7 +202,7 @@ PyObject *pyVaultPlayerNode::GetLinkToCity()
return result;
}
DEL(link);
delete link;
PYTHON_RETURN_NONE;
}

View File

@ -97,7 +97,7 @@ PyObject * pyVaultSDLNode::GetStateDataRecord() const
if (sdl.GetStateDataRecord(rec))
return pySDLStateDataRecord::New(rec);
else
DEL(rec);
delete rec;
PYTHON_RETURN_NONE;
}

View File

@ -103,7 +103,7 @@ std::string pyVaultTextNoteNode::Note_GetTitle( void )
std::string result;
aStr = StrDupToAnsi(textNote.noteTitle);
result = aStr;
FREE(aStr);
free(aStr);
return result;
}
return "";
@ -130,7 +130,7 @@ void pyVaultTextNoteNode::Note_SetText( const char * text )
wStr = StrDupToUnicode(text);
VaultTextNoteNode textNote(fNode);
textNote.SetNoteText(wStr);
FREE(wStr);
free(wStr);
}
void pyVaultTextNoteNode::Note_SetTextW( const wchar_t * text )
@ -153,7 +153,7 @@ std::string pyVaultTextNoteNode::Note_GetText( void )
std::string result;
aStr = StrDupToAnsi(textNote.noteText);
result = aStr;
FREE(aStr);
free(aStr);
return result;
}
return "";