mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 01:36:21 +00:00
Implement reference_internal with a keep_alive
reference_internal requires an `instance` field to track the returned reference's parent, but that's just a duplication of what keep_alive<0,1> does, so use a keep alive to do this to eliminate the duplication.
This commit is contained in:
@@ -24,9 +24,12 @@ Failed as expected: Incompatible constructor arguments. The following argument t
|
||||
1. example.issues.StrIssue(arg0: int)
|
||||
2. example.issues.StrIssue()
|
||||
Invoked with: no, such, constructor
|
||||
NestABase@0x1152940 constructor
|
||||
NestA@0x1152940 constructor
|
||||
NestABase@0x11f9350 constructor
|
||||
NestA@0x11f9350 constructor
|
||||
NestB@0x11f9350 constructor
|
||||
NestABase@0x112d0d0 constructor
|
||||
NestA@0x112d0d0 constructor
|
||||
NestB@0x112d0d0 constructor
|
||||
NestC@0x112d0d0 constructor
|
||||
@@ -36,9 +39,17 @@ NestC@0x112d0d0 constructor
|
||||
3
|
||||
1
|
||||
35
|
||||
-2
|
||||
42
|
||||
-2
|
||||
42
|
||||
NestC@0x112d0d0 destructor
|
||||
NestB@0x112d0d0 destructor
|
||||
NestA@0x112d0d0 destructor
|
||||
NestABase@0x112d0d0 destructor
|
||||
42
|
||||
NestA@0x1152940 destructor
|
||||
NestABase@0x1152940 destructor
|
||||
NestB@0x11f9350 destructor
|
||||
NestA@0x11f9350 destructor
|
||||
NestA@0x1152940 destructor
|
||||
NestABase@0x11f9350 destructor
|
||||
|
||||
Reference in New Issue
Block a user