| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,8 +29,6 @@ public static void PlatformCache() | |||
| 29 | 29 | Runtime.Runtime.Initialize(); | |
| 30 | 30 | ||
| 31 | 31 | Assert.That(Runtime.Runtime.Machine, Is.Not.EqualTo(MachineType.Other)); | |
| 32 | - Assert.That(!string.IsNullOrEmpty(Runtime.Runtime.MachineName)); | ||
| 33 | - | ||
| 34 | 32 | Assert.That(Runtime.Runtime.OperatingSystem, Is.Not.EqualTo(OperatingSystemType.Other)); | |
| 35 | 33 | Assert.That(!string.IsNullOrEmpty(Runtime.Runtime.OperatingSystemName)); | |
| 36 | 34 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,11 +154,6 @@ public class Runtime | |||
| 154 | 154 | /// </summary> | |
| 155 | 155 | public static MachineType Machine { get; private set; }/* set in Initialize using python's platform.machine */ | |
| 156 | 156 | ||
| 157 | - /// <summary> | ||
| 158 | - /// Gets the machine architecture as reported by python's platform.machine(). | ||
| 159 | - /// </summary> | ||
| 160 | - public static string MachineName { get; private set; } | ||
| 161 | - | ||
| 162 | 157 | internal static bool IsPython2 = pyversionnumber < 30; | |
| 163 | 158 | internal static bool IsPython3 = pyversionnumber >= 30; | |
| 164 | 159 | ||
@@ -370,7 +365,7 @@ private static void InitializePlatformData() | |||
| 370 | 365 | ||
| 371 | 366 | fn = PyObject_GetAttrString(platformModule, "machine"); | |
| 372 | 367 | op = PyObject_Call(fn, emptyTuple, IntPtr.Zero); | |
| 373 | - MachineName = GetManagedString(op); | ||
| 368 | + string machineName = GetManagedString(op); | ||
| 374 | 369 | XDecref(op); | |
| 375 | 370 | XDecref(fn); | |
| 376 | 371 | ||
@@ -387,7 +382,7 @@ private static void InitializePlatformData() | |||
| 387 | 382 | OperatingSystem = OSType; | |
| 388 | 383 | ||
| 389 | 384 | MachineType MType; | |
| 390 | - if (!MachineTypeMapping.TryGetValue(MachineName.ToLower(), out MType)) | ||
| 385 | + if (!MachineTypeMapping.TryGetValue(machineName.ToLower(), out MType)) | ||
| 391 | 386 | { | |
| 392 | 387 | MType = MachineType.Other; | |
| 393 | 388 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments