summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-12-13 16:58:30 -0200
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-14 14:21:08 -0300
commit45517664ee498074e5ea6e066897e5d9f8ea7262 (patch)
treee0f700effdd21fe05e880ac0f45da9c252f1620b
parent8f8a9916ba1faaeeb65573c81e389b214f83c987 (diff)
downloadpyside-45517664ee498074e5ea6e066897e5d9f8ea7262.tar.gz
pyside-45517664ee498074e5ea6e066897e5d9f8ea7262.tar.xz
pyside-45517664ee498074e5ea6e066897e5d9f8ea7262.zip
Small code style changes.
-rw-r--r--libpyside/pysideqflags.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libpyside/pysideqflags.cpp b/libpyside/pysideqflags.cpp
index 4fe24b8..39f8b04 100644
--- a/libpyside/pysideqflags.cpp
+++ b/libpyside/pysideqflags.cpp
@@ -39,7 +39,7 @@ extern "C" {
#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;
if (PyTuple_GET_SIZE(args)) {
@@ -61,13 +61,11 @@ extern "C" {
static long getNumberValue(PyObject* v)
{
- PyObject* number = PyNumber_Long(v);
- long result = PyLong_AsLong(number);
- Py_XDECREF(number);
- return result;
+ Shiboken::AutoDecRef number(PyNumber_Long(v));
+ return PyLong_AsLong(number);
}
- PyObject* PySideQFlagsRichCompare(PyObject *self, PyObject *other, int op)
+ PyObject* PySideQFlagsRichCompare(PyObject* self, PyObject* other, int op)
{
int result = 0;
if (!PyNumber_Check(other)) {