File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1582,40 +1582,6 @@ valid_identifier(PyObject *s)
15821582 return 1 ;
15831583}
15841584
1585- /* Replace Unicode objects in slots. */
1586-
1587- static PyObject *
1588- _unicode_to_string (PyObject * slots , Py_ssize_t nslots )
1589- {
1590- PyObject * tmp = NULL ;
1591- PyObject * slot_name , * new_name ;
1592- Py_ssize_t i ;
1593-
1594- for (i = 0 ; i < nslots ; i ++ ) {
1595- if (PyUnicode_Check (slot_name = PyTuple_GET_ITEM (slots , i ))) {
1596- if (tmp == NULL ) {
1597- tmp = PySequence_List (slots );
1598- if (tmp == NULL )
1599- return NULL ;
1600- }
1601- new_name = _PyUnicode_AsDefaultEncodedString (slot_name ,
1602- NULL );
1603- if (new_name == NULL ) {
1604- Py_DECREF (tmp );
1605- return NULL ;
1606- }
1607- Py_INCREF (new_name );
1608- PyList_SET_ITEM (tmp , i , new_name );
1609- Py_DECREF (slot_name );
1610- }
1611- }
1612- if (tmp != NULL ) {
1613- slots = PyList_AsTuple (tmp );
1614- Py_DECREF (tmp );
1615- }
1616- return slots ;
1617- }
1618-
16191585/* Forward */
16201586static int
16211587object_init (PyObject * self , PyObject * args , PyObject * kwds );
You can’t perform that action at this time.
0 commit comments