@@ -1263,17 +1263,17 @@ for nbytes in 8, 16, 32, 64:
1263
1263
for sgn in 'i', 'u':
1264
1264
is_signed = sgn == 'i'
1265
1265
print(f' case (_PACK({nbytes // 8}, {int(is_signed)})): '
1266
- + f'return formattable.fmt_{sgn}{nbytes};')
1266
+ + f'return & formattable.fmt_{sgn}{nbytes};')
1267
1267
[python start generated code]*/
1268
- case (_PACK (1 , 1 )): return formattable .fmt_i8 ;
1269
- case (_PACK (1 , 0 )): return formattable .fmt_u8 ;
1270
- case (_PACK (2 , 1 )): return formattable .fmt_i16 ;
1271
- case (_PACK (2 , 0 )): return formattable .fmt_u16 ;
1272
- case (_PACK (4 , 1 )): return formattable .fmt_i32 ;
1273
- case (_PACK (4 , 0 )): return formattable .fmt_u32 ;
1274
- case (_PACK (8 , 1 )): return formattable .fmt_i64 ;
1275
- case (_PACK (8 , 0 )): return formattable .fmt_u64 ;
1276
- /*[python end generated code: output=8f85b8f329d7b5f6 input=22ef3654bd8451ae ]*/
1268
+ case (_PACK (1 , 1 )): return & formattable .fmt_i8 ;
1269
+ case (_PACK (1 , 0 )): return & formattable .fmt_u8 ;
1270
+ case (_PACK (2 , 1 )): return & formattable .fmt_i16 ;
1271
+ case (_PACK (2 , 0 )): return & formattable .fmt_u16 ;
1272
+ case (_PACK (4 , 1 )): return & formattable .fmt_i32 ;
1273
+ case (_PACK (4 , 0 )): return & formattable .fmt_u32 ;
1274
+ case (_PACK (8 , 1 )): return & formattable .fmt_i64 ;
1275
+ case (_PACK (8 , 0 )): return & formattable .fmt_u64 ;
1276
+ /*[python end generated code: output=0194ba35c4d64ff3 input=ee9f6f5bb872d645 ]*/
1277
1277
#undef _PACK
1278
1278
}
1279
1279
/* ctypes currently only supports platforms where the basic integer types
@@ -1347,43 +1347,43 @@ for base_code, base_c_type in [
1347
1347
(base_code, 'signed ' + base_c_type, 's' + base_c_type),
1348
1348
(base_code.upper(), 'unsigned ' + base_c_type, 'u' + base_c_type),
1349
1349
]:
1350
- print(f' formattable.fmt_{code} = FIXINT_FIELDDESC_FOR({c_type});')
1350
+ print(f' formattable.fmt_{code} = * FIXINT_FIELDDESC_FOR({c_type});')
1351
1351
print(f" formattable.fmt_{code}.code = '{code}';")
1352
1352
if base_code == 'q':
1353
1353
# ffi doesn't have `long long`; keep use the fixint type
1354
1354
pass
1355
1355
else:
1356
1356
print(f' formattable.fmt_{code}.pffi_type = &ffi_type_{ffi_type};')
1357
1357
[python start generated code]*/
1358
- formattable .fmt_b = FIXINT_FIELDDESC_FOR (signed char );
1358
+ formattable .fmt_b = * FIXINT_FIELDDESC_FOR (signed char );
1359
1359
formattable .fmt_b .code = 'b' ;
1360
1360
formattable .fmt_b .pffi_type = & ffi_type_schar ;
1361
- formattable .fmt_B = FIXINT_FIELDDESC_FOR (unsigned char );
1361
+ formattable .fmt_B = * FIXINT_FIELDDESC_FOR (unsigned char );
1362
1362
formattable .fmt_B .code = 'B' ;
1363
1363
formattable .fmt_B .pffi_type = & ffi_type_uchar ;
1364
- formattable .fmt_h = FIXINT_FIELDDESC_FOR (signed short );
1364
+ formattable .fmt_h = * FIXINT_FIELDDESC_FOR (signed short );
1365
1365
formattable .fmt_h .code = 'h' ;
1366
1366
formattable .fmt_h .pffi_type = & ffi_type_sshort ;
1367
- formattable .fmt_H = FIXINT_FIELDDESC_FOR (unsigned short );
1367
+ formattable .fmt_H = * FIXINT_FIELDDESC_FOR (unsigned short );
1368
1368
formattable .fmt_H .code = 'H' ;
1369
1369
formattable .fmt_H .pffi_type = & ffi_type_ushort ;
1370
- formattable .fmt_i = FIXINT_FIELDDESC_FOR (signed int );
1370
+ formattable .fmt_i = * FIXINT_FIELDDESC_FOR (signed int );
1371
1371
formattable .fmt_i .code = 'i' ;
1372
1372
formattable .fmt_i .pffi_type = & ffi_type_sint ;
1373
- formattable .fmt_I = FIXINT_FIELDDESC_FOR (unsigned int );
1373
+ formattable .fmt_I = * FIXINT_FIELDDESC_FOR (unsigned int );
1374
1374
formattable .fmt_I .code = 'I' ;
1375
1375
formattable .fmt_I .pffi_type = & ffi_type_uint ;
1376
- formattable .fmt_l = FIXINT_FIELDDESC_FOR (signed long );
1376
+ formattable .fmt_l = * FIXINT_FIELDDESC_FOR (signed long );
1377
1377
formattable .fmt_l .code = 'l' ;
1378
1378
formattable .fmt_l .pffi_type = & ffi_type_slong ;
1379
- formattable .fmt_L = FIXINT_FIELDDESC_FOR (unsigned long );
1379
+ formattable .fmt_L = * FIXINT_FIELDDESC_FOR (unsigned long );
1380
1380
formattable .fmt_L .code = 'L' ;
1381
1381
formattable .fmt_L .pffi_type = & ffi_type_ulong ;
1382
- formattable .fmt_q = FIXINT_FIELDDESC_FOR (signed long long);
1382
+ formattable .fmt_q = * FIXINT_FIELDDESC_FOR (signed long long);
1383
1383
formattable .fmt_q .code = 'q' ;
1384
- formattable .fmt_Q = FIXINT_FIELDDESC_FOR (unsigned long long);
1384
+ formattable .fmt_Q = * FIXINT_FIELDDESC_FOR (unsigned long long);
1385
1385
formattable .fmt_Q .code = 'Q' ;
1386
- /*[python end generated code: output=3aab96e70e704ccc input=6f6d00bc889a7107 ]*/
1386
+ /*[python end generated code: output=873c87a2e6b5075a input=ee814ca263aac18e ]*/
1387
1387
1388
1388
1389
1389
/* Other types have bespoke setters and getters named `@_set` and `@_get`,
0 commit comments