s3-pylibsmb: move py_tevent_req_wait_exc up in the file
authorChristian Ambach <ambi@samba.org>
Sun, 16 Sep 2012 18:39:26 +0000 (11:39 -0700)
committerVolker Lendecke <vl@samba.org>
Sun, 23 Sep 2012 14:20:20 +0000 (07:20 -0700)
this is needed to be able to use it in other functions and
spares the prototype

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

source3/libsmb/pylibsmb.c

index 1fab7cf1031e28d39d2eecf2c0edf776366834f2..00fe2d9726d2117ec163e89f16b51c07d83751cb 100644 (file)
@@ -321,6 +321,25 @@ static int py_tevent_req_wait(struct tevent_context *ev,
 
 #endif
 
+static bool py_tevent_req_wait_exc(struct tevent_context *ev,
+                                  struct tevent_req *req)
+{
+       int ret;
+
+       if (req == NULL) {
+               PyErr_NoMemory();
+               return false;
+       }
+       ret = py_tevent_req_wait(ev, req);
+       if (ret != 0) {
+               TALLOC_FREE(req);
+               errno = ret;
+               PyErr_SetFromErrno(PyExc_RuntimeError);
+               return false;
+       }
+       return true;
+}
+
 static PyObject *py_cli_state_new(PyTypeObject *type, PyObject *args,
                                  PyObject *kwds)
 {
@@ -400,25 +419,6 @@ static void py_cli_state_dealloc(struct py_cli_state *self)
        self->ob_type->tp_free((PyObject *)self);
 }
 
-static bool py_tevent_req_wait_exc(struct tevent_context *ev,
-                                  struct tevent_req *req)
-{
-       int ret;
-
-       if (req == NULL) {
-               PyErr_NoMemory();
-               return false;
-       }
-       ret = py_tevent_req_wait(ev, req);
-       if (ret != 0) {
-               TALLOC_FREE(req);
-               errno = ret;
-               PyErr_SetFromErrno(PyExc_RuntimeError);
-               return false;
-       }
-       return true;
-}
-
 static PyObject *py_cli_create(struct py_cli_state *self, PyObject *args,
                               PyObject *kwds)
 {