Skip to content

Commit 6a6b180

Browse files
committed
Allow disabling keepalive inference for constructors
1 parent a2989c4 commit 6a6b180

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

robotpy_build/autowrap/cxxparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def _on_class_method(
11051105

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

0 commit comments

Comments
 (0)