Commit 86f3e25
committed
fix: strdup args added after initialize_generic in def_property_static (pybindgh-5976)
`def_property_static` calls `process_attributes::init` on already-initialized
function records (after `initialize_generic`'s strdup loop has run).
Args added at this stage (e.g. "self" via `append_self_arg_if_needed`) remain
as string literals, so `destruct()` would call `free()` on them.
Fix by strdup'ing name/descr of any args appended by the late
`process_attributes::init` call. Root cause introduced by pybindgh-5486.
Made-with: Cursor1 parent 3b62426 commit 86f3e25
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2687 | 2687 | | |
2688 | 2688 | | |
2689 | 2689 | | |
| 2690 | + | |
2690 | 2691 | | |
2691 | 2692 | | |
2692 | 2693 | | |
2693 | 2694 | | |
2694 | 2695 | | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
2695 | 2708 | | |
2696 | 2709 | | |
2697 | 2710 | | |
| 2711 | + | |
2698 | 2712 | | |
2699 | 2713 | | |
2700 | 2714 | | |
2701 | 2715 | | |
2702 | 2716 | | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2703 | 2725 | | |
2704 | 2726 | | |
2705 | 2727 | | |
| |||
0 commit comments