[Python-checkins] python/dist/src/Tools/bgen/bgen bgenObjectDefinition.py, 1.31, 1.32
jackjansen@users.sourceforge.net
jackjansen at users.sourceforge.net
Sun Jul 3 22:57:28 CEST 2005
Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23904
Modified Files:
bgenObjectDefinition.py
Log Message:
Sigh, changed the argument names in the tp_init function: to make them be
more in line with other methods "self" and "args" had to be renamed "_self"
and "_args". Did "_kwds" too, for consistency.
Index: bgenObjectDefinition.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenObjectDefinition.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- bgenObjectDefinition.py 29 Jun 2005 14:17:05 -0000 1.31
+++ bgenObjectDefinition.py 3 Jul 2005 20:57:26 -0000 1.32
@@ -385,7 +385,7 @@
def output_tp_init(self):
if self.output_tp_initBody:
- Output("static int %s_tp_init(PyObject *self, PyObject *args, PyObject *kwds)", self.prefix)
+ Output("static int %s_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)", self.prefix)
OutLbrace()
self.output_tp_initBody()
OutRbrace()
@@ -407,19 +407,19 @@
Output()
def output_tp_newBody(self):
- Output("PyObject *self;");
+ Output("PyObject *_self;");
Output("%s itself;", self.itselftype);
Output("char *kw[] = {\"itself\", 0};")
Output()
- Output("if (!PyArg_ParseTupleAndKeywords(args, kwds, \"O&\", kw, %s_Convert, &itself)) return NULL;",
+ Output("if (!PyArg_ParseTupleAndKeywords(_args, _kwds, \"O&\", kw, %s_Convert, &itself)) return NULL;",
self.prefix);
- Output("if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;")
- Output("((%s *)self)->ob_itself = itself;", self.objecttype)
- Output("return self;")
+ Output("if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;")
+ Output("((%s *)_self)->ob_itself = itself;", self.objecttype)
+ Output("return _self;")
def output_tp_new(self):
if self.output_tp_newBody:
- Output("static PyObject *%s_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)", self.prefix)
+ Output("static PyObject *%s_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)", self.prefix)
OutLbrace()
self.output_tp_newBody()
OutRbrace()
More information about the Python-checkins
mailing list