Skip to content

Commit

Permalink
Merge pull request #242 from robotpy/override-keepalive-infer
Browse files Browse the repository at this point in the history
Allow disabling keepalive inference for constructors
  • Loading branch information
virtuald authored Dec 30, 2024
2 parents be415f4 + 6a6b180 commit d6258c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robotpy_build/autowrap/cxxparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,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))
Expand Down

0 comments on commit d6258c3

Please sign in to comment.