Skip to content

Commit 47b3913

Browse files
committed
renamed run system property to __pythonnet_run__ to be consistent with other PythonNET properties
1 parent 6383a28 commit 47b3913

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/runtime/runtime.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ internal static Version PyVersion
8585
}
8686
}
8787

88+
const string RunSysPropName = "__pythonnet_run__";
8889
static int run = 0;
8990

9091
internal static int GetRun()
@@ -142,7 +143,7 @@ internal static void Initialize(bool initSigs = false, ShutdownMode mode = Shutd
142143
PyGILState_Ensure();
143144
}
144145

145-
BorrowedReference pyRun = PySys_GetObject("__pynet_run__");
146+
BorrowedReference pyRun = PySys_GetObject(RunSysPropName);
146147
if (pyRun != null)
147148
{
148149
run = checked((int)PyLong_AsSignedSize_t(pyRun));
@@ -201,7 +202,7 @@ static void NewRun()
201202
{
202203
run++;
203204
using var pyRun = PyLong_FromLongLong(run);
204-
PySys_SetObject("__pynet_run__", pyRun);
205+
PySys_SetObject(RunSysPropName, pyRun);
205206
}
206207

207208
private static void InitPyMembers()

0 commit comments

Comments
 (0)