Commit 2e79822
authored
[embind] Support policies in allow_subclass (#26307)
Add support for passing policies to the allow_subclass method in embind.
This allows the use of constructors that require policies, such as those
taking raw pointers, when enabling C++ subclassing from JavaScript.
Previously, allow_subclass only accepted a constructor argument, making
it impossible to use policies like allow_raw_pointer with the generated
'implement' method.
Fixes #262701 parent 8a64538 commit 2e79822
3 files changed
Lines changed: 68 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1427 | 1453 | | |
1428 | 1454 | | |
1429 | 1455 | | |
| |||
1532 | 1558 | | |
1533 | 1559 | | |
1534 | 1560 | | |
1535 | | - | |
| 1561 | + | |
1536 | 1562 | | |
1537 | 1563 | | |
1538 | | - | |
| 1564 | + | |
| 1565 | + | |
1539 | 1566 | | |
1540 | 1567 | | |
1541 | 1568 | | |
| |||
1549 | 1576 | | |
1550 | 1577 | | |
1551 | 1578 | | |
1552 | | - | |
| 1579 | + | |
| 1580 | + | |
1553 | 1581 | | |
1554 | 1582 | | |
1555 | 1583 | | |
1556 | 1584 | | |
1557 | 1585 | | |
1558 | 1586 | | |
1559 | | - | |
| 1587 | + | |
1560 | 1588 | | |
1561 | 1589 | | |
1562 | 1590 | | |
1563 | | - | |
| 1591 | + | |
| 1592 | + | |
1564 | 1593 | | |
1565 | 1594 | | |
1566 | 1595 | | |
| |||
1575 | 1604 | | |
1576 | 1605 | | |
1577 | 1606 | | |
1578 | | - | |
| 1607 | + | |
| 1608 | + | |
1579 | 1609 | | |
1580 | 1610 | | |
1581 | 1611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3381 | 3381 | | |
3382 | 3382 | | |
3383 | 3383 | | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
3384 | 3387 | | |
3385 | 3388 | | |
3386 | 3389 | | |
| |||
0 commit comments