@@ -594,7 +594,7 @@ template <> struct py_converter<${en.c_name}> {
594
594
PyErr_Fetch (&ptype, &err, &ptraceback);
595
595
// catch here all non defined errors and print instead generic warning
596
596
if (err == NULL ) {
597
- errors[${n_overload}] = pyref{ PyUnicode_FromString (" unkown error check converter" )} ;
597
+ errors[${n_overload}] = pyref::string (" unkown error check converter" );
598
598
} else {
599
599
errors[${n_overload}] = pyref{err};
600
600
}
@@ -1039,10 +1039,10 @@ PyObject* ${c.py_type}___iter__(PyObject *self) {
1039
1039
static const char * ens = " ${repr( [ (en.c_name_absolute, en.c_namespace, en.values) for en in module.enums] )}" ;
1040
1040
static const char * inclu = " ${repr( module.include_list)}" ;
1041
1041
1042
- PyDict_SetItemString (d, " classes" , pyref ( PyUnicode_FromString ( cls) ));
1043
- PyDict_SetItemString (d, " enums" , pyref ( PyUnicode_FromString ( ens) ));
1044
- PyDict_SetItemString (d, " module_name" , pyref ( PyUnicode_FromString ( " ${module.full_name}" ) ));
1045
- PyDict_SetItemString (d, " includes" , pyref ( PyUnicode_FromString ( inclu) ));
1042
+ PyDict_SetItemString (d, " classes" , pyref::string ( cls));
1043
+ PyDict_SetItemString (d, " enums" , pyref::string ( ens));
1044
+ PyDict_SetItemString (d, " module_name" , pyref::string ( " ${module.full_name}" ));
1045
+ PyDict_SetItemString (d, " includes" , pyref::string ( inclu));
1046
1046
1047
1047
return d;
1048
1048
}
0 commit comments