File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public void TestCompileExpression()
5353 {
5454 ps . SetVariable ( "bb" , 100 ) ; //declare a global variable
5555 ps . SetVariable ( "cc" , 10 ) ; //declare a local variable
56- var script = ps . Compile ( "bb+cc+3" , "" , CompileMode . Eval ) ;
56+ var script = ps . Compile ( "bb+cc+3" , "" , RunFlagType . Eval ) ;
5757 var result = ps . Execute < int > ( script ) ;
5858 Assert . AreEqual ( result , 113 ) ;
5959 }
@@ -68,7 +68,7 @@ public void TestCompileStatements()
6868 {
6969 ps . SetVariable ( "bb" , 100 ) ; //declare a global variable
7070 ps . SetVariable ( "cc" , 10 ) ; //declare a local variable
71- var script = ps . Compile ( "aa=bb+cc+3" , "" , CompileMode . File ) ;
71+ var script = ps . Compile ( "aa=bb+cc+3" , "" , RunFlagType . File ) ;
7272 ps . Execute ( script ) ;
7373 int result = ps . GetVariable < int > ( "aa" ) ;
7474 Assert . AreEqual ( result , 113 ) ;
Original file line number Diff line number Diff line change @@ -531,14 +531,7 @@ public class PySessionDisposedException: Exception
531531 {
532532
533533 }
534-
535- public enum CompileMode
536- {
537- Single = 256 ,
538- File = 257 ,
539- Eval = 258
540- }
541-
534+
542535 public class PyScope : IDisposable
543536 {
544537 public class GILState : IDisposable
@@ -731,7 +724,7 @@ public T Execute<T>(PyObject script)
731724 /// <remarks>
732725 /// Compile Python expression/statements into ast.
733726 /// </remarks>
734- public PyObject Compile ( string code , string filename = "" , CompileMode mode = CompileMode . File )
727+ public PyObject Compile ( string code , string filename = "" , RunFlagType mode = RunFlagType . File )
735728 {
736729 IntPtr flag = ( IntPtr ) mode ;
737730 IntPtr ptr = Runtime . Py_CompileString ( code , filename , flag ) ;
You can’t perform that action at this time.
0 commit comments