File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
294294 if (!validate_constant (exp -> v .Constant .value )) {
295295 PyErr_Format (PyExc_TypeError ,
296296 "got an invalid type in Constant: %s" ,
297- Py_TYPE (exp -> v .Constant .value )-> tp_name );
297+ _PyType_Name ( Py_TYPE (exp -> v .Constant .value )) );
298298 return 0 ;
299299 }
300300 return 1 ;
@@ -618,12 +618,11 @@ new_identifier(const char *n, struct compiling *c)
618618 identifier; if so, normalize to NFKC. */
619619 if (!PyUnicode_IS_ASCII (id )) {
620620 PyObject * id2 ;
621- _Py_IDENTIFIER (NFKC );
622621 if (!c -> c_normalize && !init_normalization (c )) {
623622 Py_DECREF (id );
624623 return NULL ;
625624 }
626- PyObject * form = _PyUnicode_FromId ( & PyId_NFKC );
625+ PyObject * form = PyUnicode_InternFromString ( "NFKC" );
627626 if (form == NULL ) {
628627 Py_DECREF (id );
629628 return NULL ;
@@ -637,7 +636,7 @@ new_identifier(const char *n, struct compiling *c)
637636 PyErr_Format (PyExc_TypeError ,
638637 "unicodedata.normalize() must return a string, not "
639638 "%.200s" ,
640- Py_TYPE (id2 )-> tp_name );
639+ _PyType_Name ( Py_TYPE (id2 )) );
641640 Py_DECREF (id2 );
642641 return NULL ;
643642 }
You can’t perform that action at this time.
0 commit comments