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 NEW(), TRACKED_NEW, and ZERO().

This commit is contained in:
Darryl Pogue
2012-01-21 01:09:48 -08:00
committed by Adam Johnson
parent 30430d3024
commit 5013a978eb
423 changed files with 2500 additions and 2503 deletions

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsBlueSpiralGame, args, "Params: typeID\nRetur
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyBlueSpiralGame::IsBlueSpiralGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsClimbingWallGame, args, "Params: typeID\nRet
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyClimbingWallGame::IsClimbingWallGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns tru
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyHeekGame::IsHeekGame(text);
@ -122,7 +122,7 @@ PYTHON_METHOD_DEFINITION(ptHeekGame, playGame, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* temp = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* temp = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, temp, strLen);
temp[strLen] = L'\0';
self->fThis->PlayGame(position, points, temp);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsMarkerGame, args, "Params: typeID\nReturns t
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyMarkerGame::IsMarkerGame(text);
@ -117,7 +117,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
if (PyUnicode_Check(gameNameObj))
{
int strLen = PyUnicode_GetSize(gameNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)gameNameObj, text, strLen);
text[strLen] = L'\0';
name = text;
@ -142,7 +142,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION_WKEY(PtCreateMarkerGame, args, keywords, "Params
if (PyUnicode_Check(templateIdObj))
{
int strLen = PyUnicode_GetSize(templateIdObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)templateIdObj, text, strLen);
text[strLen] = L'\0';
templateId = text;
@ -181,7 +181,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeGameName, args)
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
self->fThis->ChangeGameName(text);
@ -236,7 +236,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
name = text;
@ -261,7 +261,7 @@ PYTHON_METHOD_DEFINITION_WKEY(ptMarkerGame, addMarker, args, keywords)
if (PyUnicode_Check(ageObj))
{
int strLen = PyUnicode_GetSize(ageObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)ageObj, text, strLen);
text[strLen] = L'\0';
age = text;
@ -309,7 +309,7 @@ PYTHON_METHOD_DEFINITION(ptMarkerGame, changeMarkerName, args)
if (PyUnicode_Check(nameObj))
{
int strLen = PyUnicode_GetSize(nameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)nameObj, text, strLen);
text[strLen] = L'\0';
self->fThis->ChangeMarkerName(markerId, text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsTTTGame, args, "Params: typeID\nReturns true
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyTTTGame::IsTTTGame(text);

View File

@ -67,7 +67,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsVarSyncGame, args, "Params: typeID\nReturns
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
bool retVal = pyVarSyncGame::IsVarSyncGame(text);
@ -121,7 +121,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, setStringVar, args)
if (PyUnicode_Check(valueObj))
{
int strLen = PyUnicode_GetSize(valueObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
text[strLen] = L'\0';
self->fThis->SetStringVar(id, text);
@ -187,7 +187,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
if (PyUnicode_Check(varNameObj))
{
int strLen = PyUnicode_GetSize(varNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
text[strLen] = L'\0';
varName = text;
@ -211,7 +211,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createStringVar, args)
if (PyUnicode_Check(valueObj))
{
int strLen = PyUnicode_GetSize(valueObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)valueObj, text, strLen);
text[strLen] = L'\0';
val = text;
@ -249,7 +249,7 @@ PYTHON_METHOD_DEFINITION(ptVarSyncGame, createNumericVar, args)
if (PyUnicode_Check(varNameObj))
{
int strLen = PyUnicode_GetSize(varNameObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)varNameObj, text, strLen);
text[strLen] = L'\0';
varName = text;

View File

@ -87,7 +87,7 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetGameNameByTypeID, args, "Params: guid\nRetu
if (PyUnicode_Check(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = TRACKED_NEW wchar_t[strLen + 1];
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
std::wstring retVal = pyGameCli::GetGameNameByTypeID(text);