small fixes regarding throwing pts around to python and back
This commit is contained in:
@@ -17,10 +17,10 @@ PyObject* grpCreateTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
if (!pTextBar->Create(NULL, iWidth, iHeight))
|
||||
{
|
||||
delete pTextBar;
|
||||
return Py_BuildValue("i", NULL);
|
||||
return Py_BuildValue("K", NULL);
|
||||
}
|
||||
|
||||
return Py_BuildValue("i", pTextBar);
|
||||
return Py_BuildValue("K", pTextBar);
|
||||
}
|
||||
|
||||
PyObject* grpCreateBigTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
@@ -40,16 +40,16 @@ PyObject* grpCreateBigTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
if (!pTextBar->Create(NULL, iWidth, iHeight))
|
||||
{
|
||||
delete pTextBar;
|
||||
return Py_BuildValue("i", NULL);
|
||||
return Py_BuildValue("K", NULL);
|
||||
}
|
||||
|
||||
return Py_BuildValue("i", pTextBar);
|
||||
return Py_BuildValue("K", pTextBar);
|
||||
}
|
||||
|
||||
PyObject* grpDestroyTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
|
||||
CTextBar * pTextBar = (CTextBar *)iHandle;
|
||||
@@ -60,8 +60,8 @@ PyObject* grpDestroyTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpRenderTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
int ix;
|
||||
if (!PyTuple_GetInteger(poArgs, 1, &ix))
|
||||
@@ -79,8 +79,8 @@ PyObject* grpRenderTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpTextBarSetTextColor(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
int r;
|
||||
if (!PyTuple_GetInteger(poArgs, 1, &r))
|
||||
@@ -101,8 +101,8 @@ PyObject* grpTextBarSetTextColor(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpTextBarGetTextExtent(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
char * szText;
|
||||
if (!PyTuple_GetString(poArgs, 1, &szText))
|
||||
@@ -118,8 +118,8 @@ PyObject* grpTextBarGetTextExtent(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpTextBarTextOut(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
int ix;
|
||||
if (!PyTuple_GetInteger(poArgs, 1, &ix))
|
||||
@@ -140,8 +140,8 @@ PyObject* grpTextBarTextOut(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpClearTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
|
||||
CTextBar * pTextBar = (CTextBar *)iHandle;
|
||||
@@ -153,8 +153,8 @@ PyObject* grpClearTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpSetTextBarClipRect(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BuildException();
|
||||
int isx;
|
||||
if (!PyTuple_GetInteger(poArgs, 1, &isx))
|
||||
|
||||
Reference in New Issue
Block a user