BuildBindingC builds C-bindings of a library's API in form of automatically generated C functions
(component ComponentDefinition, outputFolderBindingC string)
| 42 | |
| 43 | // BuildBindingC builds C-bindings of a library's API in form of automatically generated C functions |
| 44 | func BuildBindingC(component ComponentDefinition, outputFolderBindingC string) error { |
| 45 | CTypesHeaderName := path.Join(outputFolderBindingC, component.BaseName + "_types.h") |
| 46 | log.Printf("Creating \"%s\"", CTypesHeaderName) |
| 47 | err := CreateCTypesHeader(component, CTypesHeaderName) |
| 48 | if (err != nil) { |
| 49 | return err; |
| 50 | } |
| 51 | |
| 52 | CHeaderName := path.Join(outputFolderBindingC, component.BaseName + ".h") |
| 53 | log.Printf("Creating \"%s\"", CTypesHeaderName) |
| 54 | err = CreateCAbiHeader(component, CHeaderName) |
| 55 | if (err != nil) { |
| 56 | return err |
| 57 | } |
| 58 | |
| 59 | return nil |
| 60 | } |
| 61 | |
| 62 | // CreateCTypesHeader creates a C header file for the types in component's API |
| 63 | func CreateCTypesHeader (component ComponentDefinition, CTypesHeaderName string) (error) { |
no test coverage detected