Commit 4b5fec4
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 6322b2d commit 4b5fec4
File tree
9 files changed
+488
-9
lines changed- bindgen-cli
- bindgen-tests/tests
- expectations/tests
- headers
- bindgen
- codegen
- ir
9 files changed
+488
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
619 | 635 | | |
620 | 636 | | |
621 | 637 | | |
| |||
1162 | 1178 | | |
1163 | 1179 | | |
1164 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1165 | 1197 | | |
1166 | 1198 | | |
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 | |
|---|---|---|---|
| |||
3991 | 3991 | | |
3992 | 3992 | | |
3993 | 3993 | | |
3994 | | - | |
3995 | | - | |
3996 | | - | |
| 3994 | + | |
| 3995 | + | |
3997 | 3996 | | |
3998 | 3997 | | |
3999 | 3998 | | |
| |||
4103 | 4102 | | |
4104 | 4103 | | |
4105 | 4104 | | |
| 4105 | + | |
4106 | 4106 | | |
4107 | 4107 | | |
4108 | 4108 | | |
| |||
4112 | 4112 | | |
4113 | 4113 | | |
4114 | 4114 | | |
| 4115 | + | |
4115 | 4116 | | |
4116 | 4117 | | |
4117 | 4118 | | |
| |||
4122 | 4123 | | |
4123 | 4124 | | |
4124 | 4125 | | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
4125 | 4140 | | |
4126 | 4141 | | |
4127 | 4142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
477 | 478 | | |
478 | 479 | | |
479 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
480 | 484 | | |
481 | 485 | | |
482 | 486 | | |
| |||
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
| 600 | + | |
596 | 601 | | |
597 | 602 | | |
598 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
682 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
683 | 686 | | |
684 | 687 | | |
| 688 | + | |
685 | 689 | | |
686 | 690 | | |
687 | 691 | | |
| |||
728 | 732 | | |
729 | 733 | | |
730 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
731 | 745 | | |
732 | 746 | | |
733 | 747 | | |
| |||
| 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