8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59206a3 commit 1591a71Copy full SHA for 1591a71
src/runtime/runtime.cs
@@ -536,6 +536,19 @@ public static int AtExit()
536
public static IntPtr PyNone;
537
public static IntPtr Error;
538
539
+ public static PyObject _none;
540
+ public static PyObject GetPyNone()
541
+ {
542
+ if (_none == null)
543
544
+ var result = Runtime.PyNone;
545
+ Runtime.XIncref(result);
546
+ _none= new PyObject(result);
547
+ }
548
+
549
+ return _none;
550
551
552
/// <summary>
553
/// Check if any Python Exceptions occurred.
554
/// If any exist throw new PythonException.
0 commit comments