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
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
/pythonnetPublic archive
forked frompythonnet/pythonnet

Commit563f6a6

Browse files
committed
Calculate Runtime fields before Initialization
1 parent7db41a9 commit563f6a6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

‎src/runtime/runtime.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ public class Runtime
151151
internalstaticobjectIsFinalizingLock=newobject();
152152
internalstaticboolIsFinalizing;
153153

154-
internalstaticboolIs32Bit;
155-
internalstaticboolIsPython2;
156-
internalstaticboolIsPython3;
154+
internalstaticboolIs32Bit=IntPtr.Size==4;
155+
internalstaticboolIsPython2=pyversionnumber<30;
156+
internalstaticboolIsPython3=pyversionnumber>=30;
157157

158158
/// <summary>
159159
/// Encoding to use to convert Unicode to/from Managed to Native
@@ -165,10 +165,6 @@ public class Runtime
165165
/// </summary>
166166
internalstaticvoidInitialize()
167167
{
168-
Is32Bit=IntPtr.Size==4;
169-
IsPython2=pyversionnumber<30;
170-
IsPython3=pyversionnumber>=30;
171-
172168
if(Py_IsInitialized()==0)
173169
{
174170
Py_Initialize();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp