diff --git a/robotpy_build/autowrap/cxxparser.py b/robotpy_build/autowrap/cxxparser.py index 3603a797..3bb7ad0e 100644 --- a/robotpy_build/autowrap/cxxparser.py +++ b/robotpy_build/autowrap/cxxparser.py @@ -1105,7 +1105,7 @@ def _on_class_method( # automatically retain references passed to constructors if the # user didn't specify their own keepalive - if is_constructor and not method_data.keepalive: + if is_constructor and method_data.keepalive is None: for i, pctx in enumerate(fctx.filtered_params): if pctx.full_cpp_type.endswith("&"): fctx.keepalives.append((1, i + 2))