From 2c80d79c78a3114729b74372639f075089aa5a77 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 30 Jun 2024 10:03:58 -0700 Subject: [PATCH] Remove stray line (probably from an accident/oversight a long time ago; harmless). --- include/pybind11/detail/init.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/pybind11/detail/init.h b/include/pybind11/detail/init.h index 9c09cfbcbc..e7b3a5f49c 100644 --- a/include/pybind11/detail/init.h +++ b/include/pybind11/detail/init.h @@ -129,7 +129,6 @@ void construct(value_and_holder &v_h, Cpp *ptr, bool need_alias) { // the holder and destruction happens when we leave the C++ scope, and the holder // class gets to handle the destruction however it likes. v_h.value_ptr() = ptr; - v_h.set_instance_registered(true); // To prevent init_instance from registering it v_h.set_instance_registered(true); // SHORTCUT To prevent init_instance from registering it // DANGER ZONE BEGIN: exceptions will leave v_h in an invalid state. v_h.type->init_instance(v_h.inst, nullptr); // Set up the holder