| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 95638e5 commit d64273e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -405,6 +405,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 405 | 405 | return true; | |
| 406 | 406 | ||
| 407 | 407 | case TypeCode.Int32: | |
| 408 | + #if !(PYTHON32 || PYTHON33 || PYTHON34) | ||
| 408 | 409 | // Trickery to support 64-bit platforms. | |
| 409 | 410 | if (IntPtr.Size == 4) { | |
| 410 | 411 | op = Runtime.PyNumber_Int(value); | |
@@ -427,6 +428,10 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 427 | 428 | return true; | |
| 428 | 429 | } | |
| 429 | 430 | else { | |
| 431 | + #else | ||
| 432 | + // When using Python3 always use the PyLong API | ||
| 433 | + { | ||
| 434 | + #endif | ||
| 430 | 435 | op = Runtime.PyNumber_Long(value); | |
| 431 | 436 | if (op == IntPtr.Zero) { | |
| 432 | 437 | if (Exceptions.ExceptionMatches(overflow)) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments