@@ -583,25 +583,70 @@ internal unsafe static extern IntPtr
583
583
PyEval_GetLocals( ) ;
584
584
585
585
586
+ #if PYTHON32 || PYTHON33 || PYTHON34
586
587
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
587
588
ExactSpelling = true , CharSet = CharSet . Ansi ) ]
589
+ [ return : MarshalAs ( UnmanagedType . LPWStr ) ]
588
590
internal unsafe static extern string
589
591
Py_GetProgramName( ) ;
590
592
591
593
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
592
594
ExactSpelling = true , CharSet = CharSet . Ansi ) ]
593
595
internal unsafe static extern void
594
- Py_SetProgramName( string name ) ;
596
+ Py_SetProgramName( [ MarshalAsAttribute ( UnmanagedType . LPWStr ) ] string name) ;
595
597
596
598
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
597
599
ExactSpelling = true , CharSet = CharSet . Ansi ) ]
600
+ [ return : MarshalAs ( UnmanagedType . LPWStr ) ]
598
601
internal unsafe static extern string
599
602
Py_GetPythonHome( ) ;
600
603
601
604
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
602
605
ExactSpelling = true , CharSet = CharSet . Ansi ) ]
603
606
internal unsafe static extern void
604
- Py_SetPythonHome( string home ) ;
607
+ Py_SetPythonHome ( [ MarshalAsAttribute ( UnmanagedType . LPWStr ) ] string home ) ;
608
+
609
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
610
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
611
+ [ return : MarshalAs ( UnmanagedType . LPWStr ) ]
612
+ internal unsafe static extern string
613
+ Py_GetPath ( ) ;
614
+
615
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
616
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
617
+ internal unsafe static extern void
618
+ Py_SetPath ( [ MarshalAsAttribute ( UnmanagedType . LPWStr ) ] string home ) ;
619
+ #else
620
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
621
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
622
+ internal unsafe static extern string
623
+ Py_GetProgramName ( ) ;
624
+
625
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
626
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
627
+ internal unsafe static extern void
628
+ Py_SetProgramName ( string name ) ;
629
+
630
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
631
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
632
+ internal unsafe static extern string
633
+ Py_GetPythonHome ( ) ;
634
+
635
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
636
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
637
+ internal unsafe static extern void
638
+ Py_SetPythonHome ( string home ) ;
639
+
640
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
641
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
642
+ internal unsafe static extern string
643
+ Py_GetPath ( ) ;
644
+
645
+ [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
646
+ ExactSpelling = true , CharSet = CharSet . Ansi ) ]
647
+ internal unsafe static extern void
648
+ Py_SetPath ( string home ) ;
649
+ #endif
605
650
606
651
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl ,
607
652
ExactSpelling = true , CharSet = CharSet . Ansi ) ]
0 commit comments