We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af1a61b commit 25211e5Copy full SHA for 25211e5
tests/test_callbacks.cpp
@@ -253,7 +253,7 @@ TEST_SUBMODULE(callbacks, m) {
253
254
// rec_capsule with custom name
255
constexpr const char *rec_capsule_name = "CUSTOM_REC_CAPSULE";
256
- py::capsule rec_capsule(malloc(1), [](void *data) { free(data); });
+ py::capsule rec_capsule(std::malloc(1), [](void *data) { std::free(data); });
257
rec_capsule.set_name(rec_capsule_name);
258
py::handle m_ptr = PyCFunction_New(&def, rec_capsule.ptr());
259
m.add_object("custom_function", m_ptr);
0 commit comments