|
51 | 51 | }
|
52 | 52 | }
|
53 | 53 |
|
54 |
| -isoc_c2pycode_map = { |
55 |
| - 'int': 'i', # int |
56 |
| - 'short int': 'h', # short int |
57 |
| - 'long': 'l', # long int |
58 |
| - 'long long': 'q', # long long int |
59 |
| - 'signed char': 'b', # signed char |
60 |
| - 'size_t': 'I', # size_t (approx unsigned int) |
61 |
| - 'int8_t': 'b', # int8_t |
62 |
| - 'int16_t': 'h', # int16_t |
63 |
| - 'int32_t': 'i', # int32_t |
64 |
| - 'int64_t': 'q', # int64_t |
65 |
| - 'int_least8_t': 'b', # int_least8_t |
66 |
| - 'int_least16_t': 'h', # int_least16_t |
67 |
| - 'int_least32_t': 'i', # int_least32_t |
68 |
| - 'int_least64_t': 'q', # int_least64_t |
69 |
| - 'int_fast8_t': 'b', # int_fast8_t |
70 |
| - 'int_fast16_t': 'h', # int_fast16_t |
71 |
| - 'int_fast32_t': 'i', # int_fast32_t |
72 |
| - 'int_fast64_t': 'q', # int_fast64_t |
73 |
| - 'intmax_t': 'q', # intmax_t (approx long long) |
74 |
| - 'intptr_t': 'q', # intptr_t (approx long long) |
75 |
| - 'ptrdiff_t': 'q', # intptr_t (approx long long) |
76 |
| - 'float': 'f', # float |
77 |
| - 'double': 'd', # double |
78 |
| - 'long double': 'g', # long double |
79 |
| - 'float _Complex': 'F', # float _Complex |
80 |
| - 'double _Complex': 'D', # double _Complex |
81 |
| - 'long double _Complex': 'D', # very approximate complex |
82 |
| - '_Bool': 'i', # Bool but not really |
83 |
| - 'char': 'c', # char |
84 |
| -} |
85 |
| - |
86 |
| -# TODO: At some point these should be included, but then they'd need special |
87 |
| -# handling in cfuncs.py e.g. needs[int64_t_from_pyobj] These are not very hard |
88 |
| -# to add, since they all derive from the base `int_from_pyobj`, e.g. the way |
89 |
| -# `short_from_pyobj` and others do |
| 54 | +# TODO: See gh-25229 |
| 55 | +isoc_c2pycode_map = {} |
90 | 56 | iso_c2py_map = {}
|
91 |
| -# iso_c2py_map = { |
92 |
| -# 'int': 'int', |
93 |
| -# 'short int': 'int', # forced casting |
94 |
| -# 'long': 'int', |
95 |
| -# 'long long': 'long', |
96 |
| -# 'signed char': 'int', # forced casting |
97 |
| -# 'size_t': 'int', # approx Python int |
98 |
| -# 'int8_t': 'int', # forced casting |
99 |
| -# 'int16_t': 'int', # forced casting |
100 |
| -# 'int32_t': 'int', |
101 |
| -# 'int64_t': 'long', |
102 |
| -# 'int_least8_t': 'int', # forced casting |
103 |
| -# 'int_least16_t': 'int', # forced casting |
104 |
| -# 'int_least32_t': 'int', |
105 |
| -# 'int_least64_t': 'long', |
106 |
| -# 'int_fast8_t': 'int', # forced casting |
107 |
| -# 'int_fast16_t': 'int', # forced casting |
108 |
| -# 'int_fast32_t': 'int', |
109 |
| -# 'int_fast64_t': 'long', |
110 |
| -# 'intmax_t': 'long', |
111 |
| -# 'intptr_t': 'long', |
112 |
| -# 'ptrdiff_t': 'long', |
113 |
| -# 'float': 'float', |
114 |
| -# 'double': 'float', # forced casting |
115 |
| -# 'long double': 'float', # forced casting |
116 |
| -# 'float _Complex': 'complex', # forced casting |
117 |
| -# 'double _Complex': 'complex', |
118 |
| -# 'long double _Complex': 'complex', # forced casting |
119 |
| -# '_Bool': 'bool', |
120 |
| -# 'char': 'bytes', # approx Python bytes |
121 |
| -# } |
122 | 57 |
|
123 | 58 | isoc_kindmap = {}
|
124 | 59 | for fortran_type, c_type_dict in iso_c_binding_map.items():
|
|
0 commit comments