@@ -88,13 +88,13 @@ public static string ProgramName
8888 get
8989 {
9090 IntPtr p = Runtime . TryUsingDll ( ( ) => Runtime . Py_GetProgramName ( ) ) ;
91- return UcsMarshaler . PtrToPy3UnicodePy2String ( p ) ?? "" ;
91+ return UcsMarshaler . PtrToString ( p ) ?? "" ;
9292 }
9393 set
9494 {
9595 Marshal . FreeHGlobal ( _programName ) ;
9696 _programName = Runtime . TryUsingDll (
97- ( ) => UcsMarshaler . Py3UnicodePy2StringtoPtr ( value )
97+ ( ) => UcsMarshaler . StringToPtr ( value )
9898 ) ;
9999 Runtime . Py_SetProgramName ( _programName ) ;
100100 }
@@ -106,13 +106,13 @@ public static string PythonHome
106106 {
107107 EnsureInitialized ( ) ;
108108 IntPtr p = Runtime . TryUsingDll ( ( ) => Runtime . Py_GetPythonHome ( ) ) ;
109- return UcsMarshaler . PtrToPy3UnicodePy2String ( p ) ?? "" ;
109+ return UcsMarshaler . PtrToString ( p ) ?? "" ;
110110 }
111111 set
112112 {
113113 // this value is null in the beginning
114114 Marshal . FreeHGlobal ( _pythonHome ) ;
115- _pythonHome = UcsMarshaler . Py3UnicodePy2StringtoPtr ( value ) ;
115+ _pythonHome = UcsMarshaler . StringToPtr ( value ) ;
116116 Runtime . TryUsingDll ( ( ) => Runtime . Py_SetPythonHome ( _pythonHome ) ) ;
117117 }
118118 }
@@ -122,13 +122,13 @@ public static string PythonPath
122122 get
123123 {
124124 IntPtr p = Runtime . TryUsingDll ( ( ) => Runtime . Py_GetPath ( ) ) ;
125- return UcsMarshaler . PtrToPy3UnicodePy2String ( p ) ?? "" ;
125+ return UcsMarshaler . PtrToString ( p ) ?? "" ;
126126 }
127127 set
128128 {
129129 Marshal . FreeHGlobal ( _pythonPath ) ;
130130 _pythonPath = Runtime . TryUsingDll (
131- ( ) => UcsMarshaler . Py3UnicodePy2StringtoPtr ( value )
131+ ( ) => UcsMarshaler . StringToPtr ( value )
132132 ) ;
133133 Runtime . Py_SetPath ( _pythonPath ) ;
134134 }
0 commit comments