@@ -683,8 +683,8 @@ StructType_setattro(PyObject *self, PyObject *key, PyObject *value)
683683 return -1 ;
684684
685685 if (value && PyUnicode_Check (key ) &&
686- /* XXX struni PyUnicode_AsString can fail (also in other places)! */
687- 0 == strcmp (PyUnicode_AsString (key ), "_fields_" ))
686+ /* XXX struni _PyUnicode_AsString can fail (also in other places)! */
687+ 0 == strcmp (_PyUnicode_AsString (key ), "_fields_" ))
688688 return StructUnionType_update_stgdict (self , value , 1 );
689689 return 0 ;
690690}
@@ -698,7 +698,7 @@ UnionType_setattro(PyObject *self, PyObject *key, PyObject *value)
698698 return -1 ;
699699
700700 if (PyUnicode_Check (key ) &&
701- 0 == strcmp (PyUnicode_AsString (key ), "_fields_" ))
701+ 0 == strcmp (_PyUnicode_AsString (key ), "_fields_" ))
702702 return StructUnionType_update_stgdict (self , value , 0 );
703703 return 0 ;
704704}
@@ -1681,7 +1681,7 @@ c_void_p_from_param(PyObject *type, PyObject *value)
16811681 if (stgd && CDataObject_Check (value ) && stgd -> proto && PyUnicode_Check (stgd -> proto )) {
16821682 PyCArgObject * parg ;
16831683
1684- switch (PyUnicode_AsString (stgd -> proto )[0 ]) {
1684+ switch (_PyUnicode_AsString (stgd -> proto )[0 ]) {
16851685 case 'z' : /* c_char_p */
16861686 case 'Z' : /* c_wchar_p */
16871687 parg = new_CArgObject ();
@@ -1791,7 +1791,7 @@ SimpleType_paramfunc(CDataObject *self)
17911791
17921792 dict = PyObject_stgdict ((PyObject * )self );
17931793 assert (dict ); /* Cannot be NULL for CDataObject instances */
1794- fmt = PyUnicode_AsString (dict -> proto );
1794+ fmt = _PyUnicode_AsString (dict -> proto );
17951795 assert (fmt );
17961796
17971797 fd = getentry (fmt );
@@ -2012,7 +2012,7 @@ SimpleType_from_param(PyObject *type, PyObject *value)
20122012 assert (dict );
20132013
20142014 /* I think we can rely on this being a one-character string */
2015- fmt = PyUnicode_AsString (dict -> proto );
2015+ fmt = _PyUnicode_AsString (dict -> proto );
20162016 assert (fmt );
20172017
20182018 fd = getentry (fmt );
@@ -3058,7 +3058,7 @@ _check_outarg_type(PyObject *arg, Py_ssize_t index)
30583058 /* simple pointer types, c_void_p, c_wchar_p, BSTR, ... */
30593059 && PyUnicode_Check (dict -> proto )
30603060/* We only allow c_void_p, c_char_p and c_wchar_p as a simple output parameter type */
3061- && (strchr ("PzZ" , PyUnicode_AsString (dict -> proto )[0 ]))) {
3061+ && (strchr ("PzZ" , _PyUnicode_AsString (dict -> proto )[0 ]))) {
30623062 return 1 ;
30633063 }
30643064
@@ -3148,7 +3148,7 @@ _get_name(PyObject *obj, char **pname)
31483148 return * pname ? 1 : 0 ;
31493149 }
31503150 if (PyUnicode_Check (obj )) {
3151- * pname = PyUnicode_AsString (obj );
3151+ * pname = _PyUnicode_AsString (obj );
31523152 return * pname ? 1 : 0 ;
31533153 }
31543154 PyErr_SetString (PyExc_TypeError ,
@@ -5127,7 +5127,7 @@ cast_check_pointertype(PyObject *arg)
51275127 dict = PyType_stgdict (arg );
51285128 if (dict ) {
51295129 if (PyUnicode_Check (dict -> proto )
5130- && (strchr ("sPzUZXO" , PyUnicode_AsString (dict -> proto )[0 ]))) {
5130+ && (strchr ("sPzUZXO" , _PyUnicode_AsString (dict -> proto )[0 ]))) {
51315131 /* simple pointer types, c_void_p, c_wchar_p, BSTR, ... */
51325132 return 1 ;
51335133 }
0 commit comments