Reduce the memory used by PySideMetaFunction instances.
This commit is contained in:
parent
67d6455fa5
commit
5c076e1c53
1 changed files with 3 additions and 3 deletions
|
|
@ -34,7 +34,7 @@ extern "C"
|
||||||
struct PySideMetaFunctionPrivate
|
struct PySideMetaFunctionPrivate
|
||||||
{
|
{
|
||||||
QObject* qobject;
|
QObject* qobject;
|
||||||
QMetaMethod method;
|
int methodIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
//methods
|
//methods
|
||||||
|
|
@ -101,7 +101,7 @@ PyObject* functionCall(PyObject* self, PyObject* args, PyObject* kw)
|
||||||
PySideMetaFunction* function = reinterpret_cast<PySideMetaFunction*>(self);
|
PySideMetaFunction* function = reinterpret_cast<PySideMetaFunction*>(self);
|
||||||
|
|
||||||
PyObject* retVal;
|
PyObject* retVal;
|
||||||
if (!PySide::MetaFunction::call(function->d->qobject, function->d->method.methodIndex(), args, &retVal))
|
if (!PySide::MetaFunction::call(function->d->qobject, function->d->methodIndex, args, &retVal))
|
||||||
return 0;
|
return 0;
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +129,7 @@ PySideMetaFunction* newObject(QObject* source, int methodIndex)
|
||||||
PySideMetaFunction* function = PyObject_New(PySideMetaFunction, &PySideMetaFunctionType);
|
PySideMetaFunction* function = PyObject_New(PySideMetaFunction, &PySideMetaFunctionType);
|
||||||
function->d = new PySideMetaFunctionPrivate();
|
function->d = new PySideMetaFunctionPrivate();
|
||||||
function->d->qobject = source;
|
function->d->qobject = source;
|
||||||
function->d->method = method;
|
function->d->methodIndex = methodIndex;
|
||||||
return function;
|
return function;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue