| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 365cd6e commit 3225465
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,6 +38,10 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. | |||
| 38 | 38 | - Unfroze Mono version on Travis (#345) | |
| 39 | 39 | - Changed `conda.recipe` build to only pull-requests (#345) | |
| 40 | 40 | ||
| 41 | + ### Deprecated | ||
| 42 | + | ||
| 43 | + - Deprecated `RunString` (#401) | ||
| 44 | + | ||
| 41 | 45 | ### Fixed | |
| 42 | 46 | ||
| 43 | 47 | - Fixed crash during Initialization (#262)(#343) | |
@@ -52,7 +56,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. | |||
| 52 | 56 | - Fixed `Py_Main` & `PySys_SetArgvEx` `no mem error` on `UCS4/PY3` (#399) | |
| 53 | 57 | - Fixed `Python.Runtime.dll.config` on macOS (#120) | |
| 54 | 58 | - Fixed crash on `PythonEngine.Version` (#413) | |
| 55 | - - Fixed `PythonEngine.PythonPath` issues (#414) | ||
| 59 | + - Fixed `PythonEngine.PythonPath` issues (#179)(#414)(#415) | ||
| 56 | 60 | ||
| 57 | 61 | ### Removed | |
| 58 | 62 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -469,16 +469,24 @@ public static void Exec(string code, IntPtr? globals = null, IntPtr? locals = nu | |||
| 469 | 469 | ||
| 470 | 470 | ||
| 471 | 471 | /// <summary> | |
| 472 | - /// RunString Method | ||
| 472 | + /// RunString Method. Function has been deprecated and will be removed. | ||
| 473 | + /// Use Exec/Eval/RunSimpleString instead. | ||
| 474 | + /// </summary> | ||
| 475 | + [Obsolete("RunString is deprecated and will be removed. Use Exec/Eval/RunSimpleString instead.")] | ||
| 476 | + public static PyObject RunString(string code, IntPtr? globals = null, IntPtr? locals = null) | ||
| 477 | + { | ||
| 478 | + return RunString(code, globals, locals, RunFlagType.File); | ||
| 479 | + } | ||
| 480 | + | ||
| 481 | + /// <summary> | ||
| 482 | + /// Internal RunString Method. | ||
| 473 | 483 | /// </summary> | |
| 474 | 484 | /// <remarks> | |
| 475 | 485 | /// Run a string containing Python code. Returns the result of | |
| 476 | 486 | /// executing the code string as a PyObject instance, or null if | |
| 477 | 487 | /// an exception was raised. | |
| 478 | 488 | /// </remarks> | |
| 479 | - public static PyObject RunString( | ||
| 480 | - string code, IntPtr? globals = null, IntPtr? locals = null, RunFlagType _flag = RunFlagType.File | ||
| 481 | - ) | ||
| 489 | + internal static PyObject RunString(string code, IntPtr? globals, IntPtr? locals, RunFlagType flag) | ||
| 482 | 490 | { | |
| 483 | 491 | var borrowedGlobals = true; | |
| 484 | 492 | if (globals == null) | |
@@ -502,12 +510,10 @@ public static PyObject RunString( | |||
| 502 | 510 | borrowedLocals = false; | |
| 503 | 511 | } | |
| 504 | 512 | ||
| 505 | - var flag = (IntPtr)_flag; | ||
| 506 | - | ||
| 507 | 513 | try | |
| 508 | 514 | { | |
| 509 | 515 | IntPtr result = Runtime.PyRun_String( | |
| 510 | - code, flag, globals.Value, locals.Value | ||
| 516 | + code, (IntPtr)flag, globals.Value, locals.Value | ||
| 511 | 517 | ); | |
| 512 | 518 | ||
| 513 | 519 | Runtime.CheckExceptionOccurred(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments