Commit 0736ef4
committed
Generate extern wrappers for inlined functions
If bindgen finds an inlined function and the
`--generate-extern-functions` options is enabled, then:
- It will generate two new source and header files with external
functions that wrap the inlined functions.
- Rerun `Bindings::generate` using the new header file to include these
wrappers in the generated bindings.
The following additional options were added:
- `--extern-function-suffix=<suffix>`: Adds <suffix> to the name of each
external wrapper function (`__extern` is used by default).
- `--extern-functions-file-name=<name>`: Uses <name> as the file name
for the header and source files (`extern` is used by default).
- `--extern-function-directory=<dir>`: Creates the source and header
files inside <dir> (`/tmp/bindgen` is used by default).
The C code serialization is experimental and only supports a very
limited set of C functions.
Fixes #1090.1 parent 95fd17b commit 0736ef4
File tree
9 files changed
+487
-9
lines changed- bindgen-cli
- bindgen-tests/tests
- expectations/tests
- headers
- bindgen
- codegen
- ir
9 files changed
+487
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
568 | 583 | | |
569 | 584 | | |
570 | 585 | | |
| |||
1092 | 1107 | | |
1093 | 1108 | | |
1094 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1095 | 1126 | | |
1096 | 1127 | | |
Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3995 | 3995 | | |
3996 | 3996 | | |
3997 | 3997 | | |
3998 | | - | |
3999 | | - | |
4000 | | - | |
| 3998 | + | |
| 3999 | + | |
4001 | 4000 | | |
4002 | 4001 | | |
4003 | 4002 | | |
| |||
4107 | 4106 | | |
4108 | 4107 | | |
4109 | 4108 | | |
| 4109 | + | |
4110 | 4110 | | |
4111 | 4111 | | |
4112 | 4112 | | |
| |||
4116 | 4116 | | |
4117 | 4117 | | |
4118 | 4118 | | |
| 4119 | + | |
4119 | 4120 | | |
4120 | 4121 | | |
4121 | 4122 | | |
| |||
4126 | 4127 | | |
4127 | 4128 | | |
4128 | 4129 | | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
4129 | 4144 | | |
4130 | 4145 | | |
4131 | 4146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
464 | 468 | | |
465 | 469 | | |
466 | 470 | | |
| |||
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| 583 | + | |
579 | 584 | | |
580 | 585 | | |
581 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
678 | 679 | | |
679 | 680 | | |
680 | 681 | | |
681 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
682 | 685 | | |
683 | 686 | | |
| 687 | + | |
684 | 688 | | |
685 | 689 | | |
686 | 690 | | |
| |||
725 | 729 | | |
726 | 730 | | |
727 | 731 | | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
728 | 742 | | |
729 | 743 | | |
730 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments