From a87e5f6c4142bb438d2e7225e299339563705553 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 9 Dec 2010 09:59:52 +0100 Subject: [PATCH] s4:pyrpc_util: s/typename/type_name to avoid c++ warnings metze --- source4/librpc/rpc/pyrpc_util.c | 10 +++++----- source4/librpc/rpc/pyrpc_util.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index 5ad8d2f9e89e..3821638fb34f 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -31,7 +31,7 @@ #include "lib/messaging/messaging.h" #include "lib/messaging/irpc.h" -bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *typename) +bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *type_name) { PyObject *mod; PyTypeObject *type; @@ -41,15 +41,15 @@ bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *typenam if (mod == NULL) { PyErr_Format(PyExc_RuntimeError, "Unable to import %s to check type %s", - module, typename); + module, type_name); return NULL; } - type = (PyTypeObject *)PyObject_GetAttrString(mod, typename); + type = (PyTypeObject *)PyObject_GetAttrString(mod, type_name); Py_DECREF(mod); if (type == NULL) { PyErr_Format(PyExc_RuntimeError, "Unable to find type %s in module %s", - module, typename); + module, type_name); return NULL; } @@ -58,7 +58,7 @@ bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *typenam if (!ret) PyErr_Format(PyExc_TypeError, "Expected type %s.%s, got %s", - module, typename, Py_TYPE(obj)->tp_name); + module, type_name, Py_TYPE(obj)->tp_name); return ret; } diff --git a/source4/librpc/rpc/pyrpc_util.h b/source4/librpc/rpc/pyrpc_util.h index 445138b9b5f6..837a33be1696 100644 --- a/source4/librpc/rpc/pyrpc_util.h +++ b/source4/librpc/rpc/pyrpc_util.h @@ -46,7 +46,7 @@ struct PyNdrRpcMethodDef { const struct ndr_interface_table *table; }; -bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *typename); +bool py_check_dcerpc_type(PyObject *obj, const char *module, const char *type_name); bool PyInterface_AddNdrRpcMethods(PyTypeObject *object, const struct PyNdrRpcMethodDef *mds); PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, PyObject *kwargs, const struct ndr_interface_table *table); -- 2.34.1