LOCALE_IO toggle implementation for locale switches on scripting; code cleanups to comply with kicad coding style policy

This commit is contained in:
Miguel Angel Ajo
2013-03-15 17:35:24 +01:00
parent d6bcbc5cdf
commit 9bb6ead2b1
12 changed files with 449 additions and 450 deletions
+4 -4
View File
@@ -65,8 +65,8 @@ wxString* newWxStringFromPy( PyObject* src )
{
bool must_unref_str = false;
wxString* result = NULL;
PyObject* obj = src;
wxString* result = NULL;
PyObject* obj = src;
#if wxUSE_UNICODE
bool must_unref_obj = false;
@@ -111,14 +111,14 @@ wxString* newWxStringFromPy( PyObject* src )
// normal string (or object) to normal python string
PyObject* str = src;
if( PyUnicode_Check( src ) ) // if it's unicode convert to normal string
if( PyUnicode_Check( src ) ) // if it's unicode convert to normal string
{
str = PyUnicode_AsEncodedString( src, wxPythonEncoding, "strict" );
if( PyErr_Occurred() )
return NULL;
}
else if( !PyString_Check( src ) ) // if it's not a string, str(obj)
else if( !PyString_Check( src ) ) // if it's not a string, str(obj)
{
str = PyObject_Str( src );
must_unref_str = true;