File tree 2 files changed +18
-9
lines changed
2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 11
11
#pragma once
12
12
13
13
#include " pytypes.h"
14
+ #include " detail/common.h"
15
+ #include " detail/descr.h"
14
16
#include " detail/type_caster_base.h"
15
17
#include " detail/typeid.h"
16
- #include " detail/descr.h"
17
- #include " detail/internals.h"
18
18
#include < array>
19
- #include < limits>
19
+ #include < cstring>
20
+ #include < functional>
21
+ #include < iosfwd>
22
+ #include < iterator>
23
+ #include < memory>
24
+ #include < string>
20
25
#include < tuple>
21
26
#include < type_traits>
27
+ #include < utility>
28
+ #include < vector>
22
29
23
30
#if defined(PYBIND11_CPP17)
24
31
# if defined(__has_include)
@@ -284,7 +291,7 @@ template <> class type_caster<bool> {
284
291
if (!src) return false ;
285
292
else if (src.ptr () == Py_True) { value = true ; return true ; }
286
293
else if (src.ptr () == Py_False) { value = false ; return true ; }
287
- else if (convert || !strcmp (" numpy.bool_" , Py_TYPE (src.ptr ())->tp_name )) {
294
+ else if (convert || !std:: strcmp (" numpy.bool_" , Py_TYPE (src.ptr ())->tp_name )) {
288
295
// (allow non-implicit conversion for numpy booleans)
289
296
290
297
Py_ssize_t res = -1 ;
Original file line number Diff line number Diff line change 14
14
#include " descr.h"
15
15
#include " internals.h"
16
16
#include " typeid.h"
17
- #include < cstring>
17
+ #include < cstdint>
18
+ #include < iterator>
18
19
#include < new>
19
20
#include < string>
21
+ #include < type_traits>
20
22
#include < typeindex>
21
23
#include < typeinfo>
22
- #include < type_traits >
24
+ #include < unordered_map >
23
25
#include < utility>
24
26
#include < vector>
25
27
@@ -245,7 +247,7 @@ struct value_and_holder {
245
247
else if (v)
246
248
inst->nonsimple .status [index ] |= instance::status_holder_constructed;
247
249
else
248
- inst->nonsimple .status [index ] &= (uint8_t ) ~instance::status_holder_constructed;
250
+ inst->nonsimple .status [index ] &= (std:: uint8_t ) ~instance::status_holder_constructed;
249
251
}
250
252
bool instance_registered () const {
251
253
return inst->simple_layout
@@ -258,7 +260,7 @@ struct value_and_holder {
258
260
else if (v)
259
261
inst->nonsimple .status [index ] |= instance::status_instance_registered;
260
262
else
261
- inst->nonsimple .status [index ] &= (uint8_t ) ~instance::status_instance_registered;
263
+ inst->nonsimple .status [index ] &= (std:: uint8_t ) ~instance::status_instance_registered;
262
264
}
263
265
};
264
266
@@ -390,7 +392,7 @@ PYBIND11_NOINLINE inline void instance::allocate_layout() {
390
392
if (!nonsimple.values_and_holders ) throw std::bad_alloc ();
391
393
std::memset (nonsimple.values_and_holders , 0 , space * sizeof (void *));
392
394
#endif
393
- nonsimple.status = reinterpret_cast <uint8_t *>(&nonsimple.values_and_holders [flags_at]);
395
+ nonsimple.status = reinterpret_cast <std:: uint8_t *>(&nonsimple.values_and_holders [flags_at]);
394
396
}
395
397
owned = true ;
396
398
}
You can’t perform that action at this time.
0 commit comments