diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-07-12 13:05:33 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-07-12 13:05:33 (GMT) |
commit | 03657cfdb056dbd36db12cc3db12a6b58a962e20 (patch) | |
tree | 18dc8d472d1eba419c8d2a31847de5607f805a66 /Modules/parsermodule.c | |
parent | 6253f83b0a2d261024cd5ef84d2e36fe4f4f1f3d (diff) | |
download | cpython-03657cfdb056dbd36db12cc3db12a6b58a962e20.zip cpython-03657cfdb056dbd36db12cc3db12a6b58a962e20.tar.gz cpython-03657cfdb056dbd36db12cc3db12a6b58a962e20.tar.bz2 |
replace PyXXX_Length calls with PyXXX_Size calls
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index feea8da..27203c3 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -610,7 +610,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw) * so we can DECREF it after the check. But we really should accept * lists as well as tuples at the very least. */ - ok = PyObject_Length(tuple) >= 2; + ok = PyObject_Size(tuple) >= 2; if (ok) { temp = PySequence_GetItem(tuple, 0); ok = (temp != NULL) && PyInt_Check(temp); @@ -626,7 +626,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw) } if (ok) { temp = PySequence_GetItem(tuple, 1); - ok = (temp != NULL) && PyObject_Length(temp) >= 2; + ok = (temp != NULL) && PyObject_Size(temp) >= 2; if (ok) { PyObject *temp2 = PySequence_GetItem(temp, 0); if (temp2 != NULL) { @@ -693,7 +693,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw) static int check_terminal_tuple(PyObject *elem) { - int len = PyObject_Length(elem); + int len = PyObject_Size(elem); int res = 1; char* str = "Illegal terminal symbol; bad node length."; @@ -731,7 +731,7 @@ check_terminal_tuple(PyObject *elem) static node* build_node_children(PyObject *tuple, node *root, int *line_num) { - int len = PyObject_Length(tuple); + int len = PyObject_Size(tuple); int i; for (i = 1; i < len; ++i) { @@ -771,7 +771,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num) (void) strcpy(strn, PyString_AS_STRING(temp)); Py_DECREF(temp); - if (PyObject_Length(elem) == 3) { + if (PyObject_Size(elem) == 3) { PyObject* temp = PySequence_GetItem(elem, 2); *line_num = PyInt_AsLong(temp); Py_DECREF(temp); |