@@ -594,7 +594,7 @@ template <> struct py_converter<${en.c_name}> {
594594 PyErr_Fetch (&ptype, &err, &ptraceback);
595595 // catch here all non defined errors and print instead generic warning
596596 if (err == NULL ) {
597- errors[${n_overload}] = pyref{ PyUnicode_FromString (" unkown error check converter" )} ;
597+ errors[${n_overload}] = pyref::string (" unkown error check converter" );
598598 } else {
599599 errors[${n_overload}] = pyref{err};
600600 }
@@ -1039,10 +1039,10 @@ PyObject* ${c.py_type}___iter__(PyObject *self) {
10391039 static const char * ens = " ${repr( [ (en.c_name_absolute, en.c_namespace, en.values) for en in module.enums] )}" ;
10401040 static const char * inclu = " ${repr( module.include_list)}" ;
10411041
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));
10461046
10471047 return d;
10481048 }
0 commit comments