@@ -610,7 +610,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw)
610610 * so we can DECREF it after the check. But we really should accept
611611 * lists as well as tuples at the very least.
612612 */
613- ok = PyObject_Length (tuple ) >= 2 ;
613+ ok = PyObject_Size (tuple ) >= 2 ;
614614 if (ok ) {
615615 temp = PySequence_GetItem (tuple , 0 );
616616 ok = (temp != NULL ) && PyInt_Check (temp );
@@ -626,7 +626,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw)
626626 }
627627 if (ok ) {
628628 temp = PySequence_GetItem (tuple , 1 );
629- ok = (temp != NULL ) && PyObject_Length (temp ) >= 2 ;
629+ ok = (temp != NULL ) && PyObject_Size (temp ) >= 2 ;
630630 if (ok ) {
631631 PyObject * temp2 = PySequence_GetItem (temp , 0 );
632632 if (temp2 != NULL ) {
@@ -693,7 +693,7 @@ parser_tuple2ast(PyAST_Object *self, PyObject *args, PyObject *kw)
693693static int
694694check_terminal_tuple (PyObject * elem )
695695{
696- int len = PyObject_Length (elem );
696+ int len = PyObject_Size (elem );
697697 int res = 1 ;
698698 char * str = "Illegal terminal symbol; bad node length." ;
699699
@@ -731,7 +731,7 @@ check_terminal_tuple(PyObject *elem)
731731static node *
732732build_node_children (PyObject * tuple , node * root , int * line_num )
733733{
734- int len = PyObject_Length (tuple );
734+ int len = PyObject_Size (tuple );
735735 int i ;
736736
737737 for (i = 1 ; i < len ; ++ i ) {
@@ -771,7 +771,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
771771 (void ) strcpy (strn , PyString_AS_STRING (temp ));
772772 Py_DECREF (temp );
773773
774- if (PyObject_Length (elem ) == 3 ) {
774+ if (PyObject_Size (elem ) == 3 ) {
775775 PyObject * temp = PySequence_GetItem (elem , 2 );
776776 * line_num = PyInt_AsLong (temp );
777777 Py_DECREF (temp );
0 commit comments