59    bool        must_unref_str = 
false;
 
   60    bool        must_unref_obj = 
false;
 
   65    PyObject*   uni_str = src;
 
   68    if( !PyBytes_Check( src ) && !PyUnicode_Check( src ) )
 
   70        obj = PyObject_Str( src );
 
   72        must_unref_obj = 
true;
 
   74        if( PyErr_Occurred() )
 
   78    if( PyBytes_Check( obj ) )
 
   81        must_unref_str = 
true;
 
   83        if( PyErr_Occurred() )
 
   87    size_t len = PyUnicode_GET_LENGTH( uni_str );
 
 
wxString result
Test unit parsing edge cases and error handling.