summaryrefslogtreecommitdiffstats
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
commit217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch)
tree4737b4a91359c94953623ab9ee297e9a90f319e4 /Modules/parsermodule.c
parent1a3284ed69d545e4ef59869998cb8c29233a45fa (diff)
downloadcpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r--Modules/parsermodule.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index a8a7ece..87f9e2e 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -89,7 +89,7 @@ node2tuple(node *n, /* node to convert */
v = mkseq(1 + NCH(n) + (TYPE(n) == encoding_decl));
if (v == NULL)
return (v);
- w = PyInt_FromLong(TYPE(n));
+ w = PyLong_FromLong(TYPE(n));
if (w == NULL) {
Py_DECREF(v);
return ((PyObject*) NULL);
@@ -111,12 +111,12 @@ node2tuple(node *n, /* node to convert */
else if (ISTERMINAL(TYPE(n))) {
PyObject *result = mkseq(2 + lineno + col_offset);
if (result != NULL) {
- (void) addelem(result, 0, PyInt_FromLong(TYPE(n)));
+ (void) addelem(result, 0, PyLong_FromLong(TYPE(n)));
(void) addelem(result, 1, PyUnicode_FromString(STR(n)));
if (lineno == 1)
- (void) addelem(result, 2, PyInt_FromLong(n->n_lineno));
+ (void) addelem(result, 2, PyLong_FromLong(n->n_lineno));
if (col_offset == 1)
- (void) addelem(result, 3, PyInt_FromLong(n->n_col_offset));
+ (void) addelem(result, 3, PyLong_FromLong(n->n_col_offset));
}
return (result);
}
@@ -664,9 +664,9 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
if (temp == NULL)
ok = 0;
else {
- ok = PyInt_Check(temp);
+ ok = PyLong_Check(temp);
if (ok)
- type = PyInt_AS_LONG(temp);
+ type = PyLong_AS_LONG(temp);
Py_DECREF(temp);
}
}
@@ -702,8 +702,8 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
if (len == 3) {
PyObject *o = PySequence_GetItem(elem, 2);
if (o != NULL) {
- if (PyInt_Check(o))
- *line_num = PyInt_AS_LONG(o);
+ if (PyLong_Check(o))
+ *line_num = PyLong_AS_LONG(o);
else {
PyErr_Format(parser_error,
"third item in terminal node must be an"
@@ -774,7 +774,7 @@ build_node_tree(PyObject *tuple)
long num = -1;
if (temp != NULL)
- num = PyInt_AsLong(temp);
+ num = PyLong_AsLong(temp);
Py_XDECREF(temp);
if (ISTERMINAL(num)) {
/*