Added missing c-style cast in string_caster::load_raw for the bytearray case

This commit is contained in:
Guillaume Giraud 2022-03-16 16:12:01 +01:00
parent 70b7f0805f
commit a453fdb2b1

View File

@ -502,7 +502,7 @@ private:
if (!bytearray) {
pybind11_fail("Unexpected PyByteArray_AsString() failure.");
}
value = StringType(bytearray, (size_t) PyByteArray_Size(src.ptr()));
value = StringType((const C *) bytearray, (size_t) PyByteArray_Size(src.ptr()));
return true;
}