Merge pull request #2 from amun3808/main

More pyvalue pointers
This commit is contained in:
d1str4ught
2025-08-27 13:43:22 +02:00
committed by GitHub
4 changed files with 5 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ bool PyTuple_GetTextInstance(PyObject* poArgs, int pos, CGraphicTextInstance** p
PyObject* grpTextGenerate(PyObject* poSelf, PyObject* poArgs) PyObject* grpTextGenerate(PyObject* poSelf, PyObject* poArgs)
{ {
CGraphicTextInstance * pTextInstance = CGraphicTextInstance::New(); CGraphicTextInstance * pTextInstance = CGraphicTextInstance::New();
return Py_BuildValue("i", pTextInstance); return Py_BuildValue("K", pTextInstance);
} }
PyObject* grpTextDestroy(PyObject* poSelf, PyObject* poArgs) PyObject* grpTextDestroy(PyObject* poSelf, PyObject* poArgs)

View File

@@ -20,7 +20,7 @@ PyObject* grpThingGenerate(PyObject* poSelf, PyObject* poArgs)
return Py_BuildException(); return Py_BuildException();
if (strlen(szFileName) <= 0) if (strlen(szFileName) <= 0)
return Py_BuildValue("i", 0); return Py_BuildValue("K", 0);
CResource* pResource = CResourceManager::Instance().GetResourcePointer(szFileName); CResource* pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
@@ -32,7 +32,7 @@ PyObject* grpThingGenerate(PyObject* poSelf, PyObject* poArgs)
pThingInstance->ReserveModelInstance(1); pThingInstance->ReserveModelInstance(1);
pThingInstance->RegisterModelThing(0, static_cast<CGraphicThing*>(pResource)); pThingInstance->RegisterModelThing(0, static_cast<CGraphicThing*>(pResource));
pThingInstance->SetModelInstance(0, 0, 0); pThingInstance->SetModelInstance(0, 0, 0);
return Py_BuildValue("i", pThingInstance); return Py_BuildValue("K", pThingInstance);
} }
PyObject* grpThingDelete(PyObject* poSelf, PyObject* poArgs) PyObject* grpThingDelete(PyObject* poSelf, PyObject* poArgs)

View File

@@ -223,7 +223,7 @@ void CGuildMarkUploader::__Inialize()
if (m_pbySymbolBuf) if (m_pbySymbolBuf)
{ {
delete m_pbySymbolBuf; delete[] m_pbySymbolBuf;
} }
m_dwSymbolBufSize = 0; m_dwSymbolBufSize = 0;

View File

@@ -282,7 +282,7 @@ PyObject * itemGetIconInstance(PyObject * poSelf, PyObject * poArgs)
CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New(); CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New();
pImageInstance->SetImagePointer(pImage); pImageInstance->SetImagePointer(pImage);
return Py_BuildValue("i", pImageInstance); return Py_BuildValue("K", pImageInstance);
} }
PyObject * itemDeleteIconInstance(PyObject * poSelf, PyObject * poArgs) PyObject * itemDeleteIconInstance(PyObject * poSelf, PyObject * poArgs)