Small code style changes.
This commit is contained in:
parent
c78b4686a1
commit
7b8d2925dd
1 changed files with 4 additions and 6 deletions
|
|
@ -39,7 +39,7 @@ extern "C" {
|
||||||
|
|
||||||
#define PYSIDE_QFLAGS(X) reinterpret_cast<PySideQFlagsObject*>(X)
|
#define PYSIDE_QFLAGS(X) reinterpret_cast<PySideQFlagsObject*>(X)
|
||||||
|
|
||||||
PyObject* PySideQFlagsNew(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
PyObject* PySideQFlagsNew(PyTypeObject* type, PyObject* args, PyObject* kwds)
|
||||||
{
|
{
|
||||||
long val = 0;
|
long val = 0;
|
||||||
if (PyTuple_GET_SIZE(args)) {
|
if (PyTuple_GET_SIZE(args)) {
|
||||||
|
|
@ -61,13 +61,11 @@ extern "C" {
|
||||||
|
|
||||||
static long getNumberValue(PyObject* v)
|
static long getNumberValue(PyObject* v)
|
||||||
{
|
{
|
||||||
PyObject* number = PyNumber_Long(v);
|
Shiboken::AutoDecRef number(PyNumber_Long(v));
|
||||||
long result = PyLong_AsLong(number);
|
return PyLong_AsLong(number);
|
||||||
Py_XDECREF(number);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject* PySideQFlagsRichCompare(PyObject *self, PyObject *other, int op)
|
PyObject* PySideQFlagsRichCompare(PyObject* self, PyObject* other, int op)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (!PyNumber_Check(other)) {
|
if (!PyNumber_Check(other)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue