@@ -237,6 +237,17 @@ Numbers
237
237
Convert a Python integer to a tiny int without overflow checking, stored in a C
238
238
:c:expr: `unsigned char `.
239
239
240
+ ``c `` (:class: `bytes ` or :class: `bytearray ` of length 1) [char]
241
+ Convert a Python byte, represented as a :class: `bytes ` or
242
+ :class: `bytearray ` object of length 1, to a C :c:expr: `char `.
243
+
244
+ .. versionchanged :: 3.3
245
+ Allow :class: `bytearray ` objects.
246
+
247
+ ``C `` (:class: `str ` of length 1) [int]
248
+ Convert a Python character, represented as a :class: `str ` object of
249
+ length 1, to a C :c:expr: `int `.
250
+
240
251
``h `` (:class: `int `) [short int]
241
252
Convert a Python integer to a C :c:expr: `short int `.
242
253
@@ -251,13 +262,13 @@ Numbers
251
262
Convert a Python integer to a C :c:expr: `unsigned int `, without overflow
252
263
checking.
253
264
254
- ``l `` (:class: `int `) [long int]
255
- Convert a Python integer to a C :c:expr: `long int `.
256
-
257
265
``k `` (:class: `int `) [unsigned long]
258
266
Convert a Python integer to a C :c:expr: `unsigned long ` without
259
267
overflow checking.
260
268
269
+ ``l `` (:class: `int `) [long int]
270
+ Convert a Python integer to a C :c:expr: `long int `.
271
+
261
272
``L `` (:class: `int `) [long long]
262
273
Convert a Python integer to a C :c:expr: `long long `.
263
274
@@ -268,17 +279,6 @@ Numbers
268
279
``n `` (:class: `int `) [:c:type: `Py_ssize_t `]
269
280
Convert a Python integer to a C :c:type: `Py_ssize_t `.
270
281
271
- ``c `` (:class: `bytes ` or :class: `bytearray ` of length 1) [char]
272
- Convert a Python byte, represented as a :class: `bytes ` or
273
- :class: `bytearray ` object of length 1, to a C :c:expr: `char `.
274
-
275
- .. versionchanged :: 3.3
276
- Allow :class: `bytearray ` objects.
277
-
278
- ``C `` (:class: `str ` of length 1) [int]
279
- Convert a Python character, represented as a :class: `str ` object of
280
- length 1, to a C :c:expr: `int `.
281
-
282
282
``f `` (:class: `float `) [float]
283
283
Convert a Python floating point number to a C :c:expr: `float `.
284
284
0 commit comments