File tree 1 file changed +3
-4
lines changed
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)
294
294
if (!validate_constant (exp -> v .Constant .value )) {
295
295
PyErr_Format (PyExc_TypeError ,
296
296
"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 )) );
298
298
return 0 ;
299
299
}
300
300
return 1 ;
@@ -618,12 +618,11 @@ new_identifier(const char *n, struct compiling *c)
618
618
identifier; if so, normalize to NFKC. */
619
619
if (!PyUnicode_IS_ASCII (id )) {
620
620
PyObject * id2 ;
621
- _Py_IDENTIFIER (NFKC );
622
621
if (!c -> c_normalize && !init_normalization (c )) {
623
622
Py_DECREF (id );
624
623
return NULL ;
625
624
}
626
- PyObject * form = _PyUnicode_FromId ( & PyId_NFKC );
625
+ PyObject * form = PyUnicode_InternFromString ( "NFKC" );
627
626
if (form == NULL ) {
628
627
Py_DECREF (id );
629
628
return NULL ;
@@ -637,7 +636,7 @@ new_identifier(const char *n, struct compiling *c)
637
636
PyErr_Format (PyExc_TypeError ,
638
637
"unicodedata.normalize() must return a string, not "
639
638
"%.200s" ,
640
- Py_TYPE (id2 )-> tp_name );
639
+ _PyType_Name ( Py_TYPE (id2 )) );
641
640
Py_DECREF (id2 );
642
641
return NULL ;
643
642
}
You can’t perform that action at this time.
0 commit comments