s3-pylibsmb: Use Py_RETURN_NONE
authorVolker Lendecke <vl@samba.org>
Mon, 24 Sep 2012 01:50:22 +0000 (18:50 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 24 Sep 2012 06:09:53 +0000 (08:09 +0200)
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 24 08:09:53 CEST 2012 on sn-devel-104

source3/libsmb/pylibsmb.c

index e357d0fc0538c8dfc25839a2b216a5132c171692..900d05212c54516110717c86dd807f51f72cb311 100644 (file)
@@ -544,9 +544,7 @@ static PyObject *py_cli_get_oplock_break(struct py_cli_state *self,
 
                return result;
        }
-
-       Py_INCREF(Py_None);
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 static void py_cli_state_dealloc(struct py_cli_state *self)
@@ -628,8 +626,7 @@ static PyObject *py_cli_close(struct py_cli_state *self, PyObject *args)
                PyErr_SetNTSTATUS(status);
                return NULL;
        }
-       Py_INCREF(Py_None);
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_write(struct py_cli_state *self, PyObject *args,
@@ -733,8 +730,7 @@ static PyObject *py_cli_ftruncate(struct py_cli_state *self, PyObject *args,
                PyErr_SetNTSTATUS(status);
                return NULL;
        }
-       Py_INCREF(Py_None);
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_delete_on_close(struct py_cli_state *self,
@@ -765,8 +761,7 @@ static PyObject *py_cli_delete_on_close(struct py_cli_state *self,
                PyErr_SetNTSTATUS(status);
                return NULL;
        }
-       Py_INCREF(Py_None);
-       return Py_None;
+       Py_RETURN_NONE;
 }
 
 static PyObject *py_cli_list(struct py_cli_state *self,