Commit 50ddfe3
committed
Fix c_void_p for large and negative values.
This fixes mesonbuild arch detection on Windows, where they do
kernel32 = ctypes.windll.kernel32
process = ctypes.c_void_p(kernel32.GetCurrentProcess())
GetCurrentProcess() is documented to return -1, and we refused to convert a
negative value to a pointer.1 parent 7f330d9 commit 50ddfe3
File tree
3 files changed
+62
-13
lines changed- graalpython
- com.oracle.graal.python.test/src/tests/cpyext
- com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes
- memory
3 files changed
+62
-13
lines changedLines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
729 | 728 | | |
730 | | - | |
731 | | - | |
| 729 | + | |
732 | 730 | | |
733 | 731 | | |
734 | 732 | | |
735 | | - | |
736 | | - | |
737 | 733 | | |
738 | | - | |
| 734 | + | |
739 | 735 | | |
740 | | - | |
741 | 736 | | |
742 | 737 | | |
743 | 738 | | |
| |||
Lines changed: 35 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
790 | 794 | | |
791 | 795 | | |
792 | 796 | | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
798 | 827 | | |
799 | 828 | | |
800 | 829 | | |
| |||
0 commit comments