Skip to content

Commit b43f382

Browse files
committed
Keep RunString Public
Deprecation/Removal should be a separate issue/pr
1 parent ea44eef commit b43f382

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/embed_tests/pyrunstring.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void TestEval()
4040
locals.SetItem("a", new PyInt(10));
4141

4242
object b = PythonEngine.Eval("sys.attr1 + a + 1", null, locals.Handle)
43-
.AsManagedObject(typeof(Int32));
43+
.AsManagedObject(typeof(int));
4444
Assert.AreEqual(b, 111);
4545
}
4646

@@ -54,7 +54,7 @@ public void TestExec()
5454
locals.SetItem("a", new PyInt(10));
5555

5656
PythonEngine.Exec("c = sys.attr1 + a + 1", null, locals.Handle);
57-
object c = locals.GetItem("c").AsManagedObject(typeof(Int32));
57+
object c = locals.GetItem("c").AsManagedObject(typeof(int));
5858
Assert.AreEqual(c, 111);
5959
}
6060
}

src/runtime/pythonengine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public static void Exec(string code, IntPtr? globals = null, IntPtr? locals = nu
432432
/// executing the code string as a PyObject instance, or null if
433433
/// an exception was raised.
434434
/// </remarks>
435-
internal static PyObject RunString(
435+
public static PyObject RunString(
436436
string code, IntPtr? globals = null, IntPtr? locals = null, RunFlagType _flag = RunFlagType.File
437437
)
438438
{

0 commit comments

Comments
 (0)