Commit 9e6ce49
committed
Fix smart_holder multiple inheritance tests
The original pybind11 holder supported multiple inheritance by recursively creating
type casters until it finds one for the source type, then converting each
value in turn to the next type via typeinfo->implicit_cast
The smart_holder only stored the last implicit_cast, which was incorrect.
This commit changes it to create a list of implicit_cast functions that are
appended to during the recursive type caster creation, and when the time comes
to cast to the destination type, it calls all of them in the correct order.1 parent 01e7fad commit 9e6ce49
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
254 | | - | |
| 256 | + | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
| |||
521 | 523 | | |
522 | 524 | | |
523 | 525 | | |
524 | | - | |
525 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
526 | 530 | | |
527 | 531 | | |
528 | 532 | | |
| |||
0 commit comments