Skip to content

Commit d6258c3

Browse files
authored
Merge pull request #242 from robotpy/override-keepalive-infer
Allow disabling keepalive inference for constructors
2 parents be415f4 + 6a6b180 commit d6258c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

robotpy_build/autowrap/cxxparser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ def _on_class_method(
11081108

11091109
# automatically retain references passed to constructors if the
11101110
# user didn't specify their own keepalive
1111-
if is_constructor and not method_data.keepalive:
1111+
if is_constructor and method_data.keepalive is None:
11121112
for i, pctx in enumerate(fctx.filtered_params):
11131113
if pctx.full_cpp_type.endswith("&"):
11141114
fctx.keepalives.append((1, i + 2))

0 commit comments

Comments
 (0)