From 15e43ef4181b2bdcde28108bd489d40c7901190f Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 12 Apr 2022 15:31:51 -0500 Subject: [PATCH] Update include/pybind11/pytypes.h Co-authored-by: Aaron Gokaslan --- include/pybind11/pytypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 190a9a729f6..b7db6fbd3d8 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -1640,7 +1640,7 @@ class capsule : public object { const char *name() const { return PyCapsule_GetName(m_ptr); } /// Replaces a capsule's name *without* calling the destructor on the existing one. - void set_name(const char *&new_name) { + void set_name(const char *new_name) { if (PyCapsule_SetName(m_ptr, new_name) != 0) { throw error_already_set(); }