Skip to content

Commit 25211e5

Browse files
Skylion007EthanSteinberg
authored andcommitted
Fix test
1 parent af1a61b commit 25211e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_callbacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ TEST_SUBMODULE(callbacks, m) {
253253

254254
// rec_capsule with custom name
255255
constexpr const char *rec_capsule_name = "CUSTOM_REC_CAPSULE";
256-
py::capsule rec_capsule(malloc(1), [](void *data) { free(data); });
256+
py::capsule rec_capsule(std::malloc(1), [](void *data) { std::free(data); });
257257
rec_capsule.set_name(rec_capsule_name);
258258
py::handle m_ptr = PyCFunction_New(&def, rec_capsule.ptr());
259259
m.add_object("custom_function", m_ptr);

0 commit comments

Comments
 (0)