Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9358531

Browse files
committed
ImportHook: drop dead code around clr_prefix
1 parent0faebb2 commit9358531

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

‎src/runtime/importhook.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw)
258258
}
259259

260260
stringrealname=mod_name;
261-
stringclr_prefix=null;
262261

263262
// 2010-08-15: Always seemed smart to let python try first...
264263
// This shaves off a few tenths of a second on test_module.py
@@ -316,10 +315,7 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw)
316315
}
317316
returnnewNewReference(module).DangerousMoveToPointer();
318317
}
319-
if(clr_prefix!=null)
320-
{
321-
returnGetCLRModule(fromList).DangerousMoveToPointerOrNull();
322-
}
318+
323319
module=Runtime.PyDict_GetItemString(modules,names[0]);
324320
returnnewNewReference(module,canBeNull:true).DangerousMoveToPointer();
325321
}
@@ -359,12 +355,6 @@ public static IntPtr __import__(IntPtr self, IntPtr argsRaw, IntPtr kw)
359355

360356
// Add the module to sys.modules
361357
Runtime.PyDict_SetItemString(modules,tail.moduleName,tail.ObjectReference);
362-
363-
// If imported from CLR add clr.<modulename> to sys.modules as well
364-
if(clr_prefix!=null)
365-
{
366-
Runtime.PyDict_SetItemString(modules,clr_prefix+tail.moduleName,tail.ObjectReference);
367-
}
368358
}
369359

370360
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp