| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -259,7 +259,6 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw) | |||
| 259 | 259 | } | |
| 260 | 260 | ||
| 261 | 261 | string realname = mod_name; | |
| 262 | - string clr_prefix = null; | ||
| 263 | 262 | ||
| 264 | 263 | // 2010-08-15: Always seemed smart to let python try first... | |
| 265 | 264 | // This shaves off a few tenths of a second on test_module.py | |
@@ -317,10 +316,7 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw) | |||
| 317 | 316 | } | |
| 318 | 317 | return new NewReference(module).DangerousMoveToPointer(); | |
| 319 | 318 | } | |
| 320 | - if (clr_prefix != null) | ||
| 321 | - { | ||
| 322 | - return GetCLRModule(fromList).DangerousMoveToPointerOrNull(); | ||
| 323 | - } | ||
| 319 | + | ||
| 324 | 320 | module = Runtime.PyDict_GetItemString(modules, names[0]); | |
| 325 | 321 | return new NewReference(module, canBeNull: true).DangerousMoveToPointer(); | |
| 326 | 322 | } | |
@@ -360,12 +356,6 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw) | |||
| 360 | 356 | ||
| 361 | 357 | // Add the module to sys.modules | |
| 362 | 358 | Runtime.PyDict_SetItemString(modules, tail.moduleName, tail.ObjectReference); | |
| 363 | - | ||
| 364 | - // If imported from CLR add clr.<modulename> to sys.modules as well | ||
| 365 | - if (clr_prefix != null) | ||
| 366 | - { | ||
| 367 | - Runtime.PyDict_SetItemString(modules, clr_prefix + tail.moduleName, tail.ObjectReference); | ||
| 368 | - } | ||
| 369 | 359 | } | |
| 370 | 360 | ||
| 371 | 361 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments