summaryrefslogtreecommitdiffstats
path: root/Tools/bgen
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:57:26 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2005-07-03 20:57:26 (GMT)
commit7b8f0a1843568f0b91c8c8c3f643210b1692dee3 (patch)
treee7c91a7969b69d7beb42aa22e57b1a18f72a76db /Tools/bgen
parentf73b4b007798e8c088280a9e25be7cc66e470435 (diff)
downloadcpython-7b8f0a1843568f0b91c8c8c3f643210b1692dee3.zip
cpython-7b8f0a1843568f0b91c8c8c3f643210b1692dee3.tar.gz
cpython-7b8f0a1843568f0b91c8c8c3f643210b1692dee3.tar.bz2
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.
Diffstat (limited to 'Tools/bgen')
-rw-r--r--Tools/bgen/bgen/bgenObjectDefinition.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/bgen/bgen/bgenObjectDefinition.py b/Tools/bgen/bgen/bgenObjectDefinition.py
index 64075de..f0dfc4f 100644
--- a/Tools/bgen/bgen/bgenObjectDefinition.py
+++ b/Tools/bgen/bgen/bgenObjectDefinition.py
@@ -385,7 +385,7 @@ class PEP253Mixin(PEP252Mixin):
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 @@ class PEP253Mixin(PEP252Mixin):
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()