GetModuleNames()
diff --git a/src/runtime/tricks/NullOnly.cs b/src/runtime/tricks/NullOnly.cs
new file mode 100644
index 000000000..cc2679a61
--- /dev/null
+++ b/src/runtime/tricks/NullOnly.cs
@@ -0,0 +1,12 @@
+namespace Python.Runtime
+{
+ ///
+ /// An utility class, that can only have one value: null.
+ /// Useful for overloading operators on structs,
+ /// that have meaningful concept of null value (e.g. pointers and references).
+ ///
+ class NullOnly
+ {
+ private NullOnly() { }
+ }
+}
diff --git a/src/testing/threadtest.cs b/src/testing/threadtest.cs
index 9c76929b2..6664c3643 100644
--- a/src/testing/threadtest.cs
+++ b/src/testing/threadtest.cs
@@ -34,7 +34,7 @@ public static string CallEchoString(string arg)
{
if (module == null)
{
- module = PythonEngine.ModuleFromString("tt", testmod);
+ module = PyModule.FromString("tt", testmod);
}
PyObject func = module.GetAttr("echostring");
var parg = new PyString(arg);
@@ -58,7 +58,7 @@ public static string CallEchoString2(string arg)
{
if (module == null)
{
- module = PythonEngine.ModuleFromString("tt", testmod);
+ module = PyModule.FromString("tt", testmod);
}
PyObject func = module.GetAttr("echostring2");
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy