Underscore prefix is reserved for the compiler and standard library so
we should not use it for our helpers.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
python/sanlock.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/python/sanlock.c b/python/sanlock.c
index 42b46fb..4155b51 100644
--- a/python/sanlock.c
+++ b/python/sanlock.c
@@ -20,11 +20,11 @@
#define BIND_ERROR -1000
/* Functions prototypes */
static void set_sanlock_error(int en, char *msg);
-static int __parse_resource(PyObject *obj, struct sanlk_resource **res_ret);
+static int parse_disks(PyObject *obj, struct sanlk_resource **res_ret);
static void set_error(PyObject *exception, const char* format, PyObject* obj);
/* Sanlock module */
PyDoc_STRVAR(pydoc_sanlock, "\
Copyright (C) 2010-2011 Red Hat, Inc. All rights reserved.\n\
@@ -171,11 +171,11 @@ finally:
Py_XDECREF(path);
return rv;
}
static int
-__parse_resource(PyObject *obj, struct sanlk_resource **res_ret)
+parse_disks(PyObject *obj, struct sanlk_resource **res_ret)
{
int i, num_disks, res_len;
struct sanlk_resource *res;
num_disks = PyList_Size(obj);
@@ -479,11 +479,11 @@ py_init_resource(PyObject *self __unused, PyObject *args, PyObject
*keywds)
&PyList_Type, &disks, &max_hosts, &num_hosts, &use_aio)) {
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &res) < 0) {
+ if (parse_disks(disks, &res) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
@@ -745,11 +745,11 @@ py_write_resource(PyObject *self __unused, PyObject *args, PyObject
*keywds)
&PyList_Type, &disks, &max_hosts, &num_hosts, &clear,
&align, §or)) {
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &rs) < 0) {
+ if (parse_disks(disks, &rs) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(rs->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
@@ -1116,11 +1116,11 @@ py_acquire(PyObject *self __unused, PyObject *args, PyObject
*keywds)
set_sanlock_error(EINVAL, "Invalid slkfd and pid values");
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &res) < 0) {
+ if (parse_disks(disks, &res) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
@@ -1183,11 +1183,11 @@ py_release(PyObject *self __unused, PyObject *args, PyObject
*keywds)
&PyList_Type, &disks, &sanlockfd, &pid)) {
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &res) < 0) {
+ if (parse_disks(disks, &res) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
@@ -1239,11 +1239,11 @@ py_request(PyObject *self __unused, PyObject *args, PyObject
*keywds)
&PyList_Type, &disks, &action, &version)) {
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &res) < 0) {
+ if (parse_disks(disks, &res) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
@@ -1311,11 +1311,11 @@ py_read_resource_owners(PyObject *self __unused, PyObject *args,
PyObject *keywd
&PyList_Type, &disks, &align, §or)) {
goto finally;
}
/* parse and check sanlock resource */
- if (__parse_resource(disks, &res) < 0) {
+ if (parse_disks(disks, &res) < 0) {
goto finally;
}
/* prepare sanlock names */
strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
--
2.17.2