Remove debug printf and fix indentation inside of block

This commit is contained in:
Thomas Pointhuber 2018-10-18 08:39:36 +02:00 committed by Maciej Suminski
parent 95e55eb17a
commit e39eeb2f92
1 changed files with 13 additions and 14 deletions

View File

@ -415,7 +415,6 @@ wxString PyStringToWx( PyObject* aString )
if( !aString )
return ret;
printf("PyStringToWx\n");
#if PY_MAJOR_VERSION >= 3
const char* str_res = NULL;
PyObject* temp_bytes = PyUnicode_AsEncodedString( aString, "UTF-8", "strict" );
@ -454,20 +453,20 @@ wxArrayString PyArrayStringToWx( PyObject* aArrayString )
if( element )
{
#if PY_MAJOR_VERSION >= 3
const char* str_res = NULL;
PyObject* temp_bytes = PyUnicode_AsEncodedString( element, "UTF-8", "strict" );
if( temp_bytes != NULL )
{
str_res = PyBytes_AS_STRING( temp_bytes );
ret.Add( FROM_UTF8( str_res ), 1 );
Py_DECREF( temp_bytes );
}
else
{
wxLogMessage( "cannot encode unicode python string" );
}
const char* str_res = NULL;
PyObject* temp_bytes = PyUnicode_AsEncodedString( element, "UTF-8", "strict" );
if( temp_bytes != NULL )
{
str_res = PyBytes_AS_STRING( temp_bytes );
ret.Add( FROM_UTF8( str_res ), 1 );
Py_DECREF( temp_bytes );
}
else
{
wxLogMessage( "cannot encode unicode python string" );
}
#else
ret.Add( FROM_UTF8( PyString_AsString( element ) ), 1 );
ret.Add( FROM_UTF8( PyString_AsString( element ) ), 1 );
#endif
}
}