@@ -1233,64 +1233,66 @@ f! {
1233
1233
* slot = 0 ;
1234
1234
}
1235
1235
}
1236
+ }
1236
1237
1237
- pub fn WIFSTOPPED ( status: :: c_int) -> bool {
1238
+ safe_f ! {
1239
+ pub { const } fn WIFSTOPPED ( status: :: c_int) -> bool {
1238
1240
( status & 0xff ) == 0x7f
1239
1241
}
1240
1242
1241
- pub fn WSTOPSIG ( status: :: c_int) -> :: c_int {
1243
+ pub { const } fn WSTOPSIG ( status: :: c_int) -> :: c_int {
1242
1244
( status >> 8 ) & 0xff
1243
1245
}
1244
1246
1245
- pub fn WIFCONTINUED ( status: :: c_int) -> bool {
1247
+ pub { const } fn WIFCONTINUED ( status: :: c_int) -> bool {
1246
1248
status == 0xffff
1247
1249
}
1248
1250
1249
- pub fn WIFSIGNALED ( status: :: c_int) -> bool {
1251
+ pub { const } fn WIFSIGNALED ( status: :: c_int) -> bool {
1250
1252
( ( status & 0x7f ) + 1 ) as i8 >= 2
1251
1253
}
1252
1254
1253
- pub fn WTERMSIG ( status: :: c_int) -> :: c_int {
1255
+ pub { const } fn WTERMSIG ( status: :: c_int) -> :: c_int {
1254
1256
status & 0x7f
1255
1257
}
1256
1258
1257
- pub fn WIFEXITED ( status: :: c_int) -> bool {
1259
+ pub { const } fn WIFEXITED ( status: :: c_int) -> bool {
1258
1260
( status & 0x7f ) == 0
1259
1261
}
1260
1262
1261
- pub fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
1263
+ pub { const } fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
1262
1264
( status >> 8 ) & 0xff
1263
1265
}
1264
1266
1265
- pub fn WCOREDUMP ( status: :: c_int) -> bool {
1267
+ pub { const } fn WCOREDUMP ( status: :: c_int) -> bool {
1266
1268
( status & 0x80 ) != 0
1267
1269
}
1268
1270
1269
- pub fn W_EXITCODE ( ret: :: c_int, sig: :: c_int) -> :: c_int {
1271
+ pub { const } fn W_EXITCODE ( ret: :: c_int, sig: :: c_int) -> :: c_int {
1270
1272
( ret << 8 ) | sig
1271
1273
}
1272
1274
1273
- pub fn W_STOPCODE ( sig: :: c_int) -> :: c_int {
1275
+ pub { const } fn W_STOPCODE ( sig: :: c_int) -> :: c_int {
1274
1276
( sig << 8 ) | 0x7f
1275
1277
}
1276
1278
1277
- pub fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
1279
+ pub { const } fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
1278
1280
( cmd << 8 ) | ( type_ & 0x00ff )
1279
1281
}
1280
1282
1281
- pub fn IPOPT_COPIED ( o: u8 ) -> u8 {
1283
+ pub { const } fn IPOPT_COPIED ( o: u8 ) -> u8 {
1282
1284
o & IPOPT_COPY
1283
1285
}
1284
1286
1285
- pub fn IPOPT_CLASS ( o: u8 ) -> u8 {
1287
+ pub { const } fn IPOPT_CLASS ( o: u8 ) -> u8 {
1286
1288
o & IPOPT_CLASS_MASK
1287
1289
}
1288
1290
1289
- pub fn IPOPT_NUMBER ( o: u8 ) -> u8 {
1291
+ pub { const } fn IPOPT_NUMBER ( o: u8 ) -> u8 {
1290
1292
o & IPOPT_NUMBER_MASK
1291
1293
}
1292
1294
1293
- pub fn IPTOS_ECN ( x: u8 ) -> u8 {
1295
+ pub { const } fn IPTOS_ECN ( x: u8 ) -> u8 {
1294
1296
x & :: IPTOS_ECN_MASK
1295
1297
}
1296
1298
}
0 commit comments