-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate bindings for non-public extern items
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
- Loading branch information
Showing
8 changed files
with
130 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
extern const uint32_t FIRST; | ||
|
||
extern const uint32_t RENAMED; | ||
|
||
void first(void); | ||
|
||
void renamed(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif // __cplusplus | ||
|
||
extern const uint32_t FIRST; | ||
|
||
extern const uint32_t RENAMED; | ||
|
||
void first(void); | ||
|
||
void renamed(void); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif // __cplusplus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <cstdarg> | ||
#include <cstdint> | ||
#include <cstdlib> | ||
#include <ostream> | ||
#include <new> | ||
|
||
extern "C" { | ||
|
||
extern const uint32_t FIRST; | ||
|
||
extern const uint32_t RENAMED; | ||
|
||
void first(); | ||
|
||
void renamed(); | ||
|
||
} // extern "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t | ||
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t | ||
cdef extern from *: | ||
ctypedef bint bool | ||
ctypedef struct va_list | ||
|
||
cdef extern from *: | ||
|
||
extern const uint32_t FIRST; | ||
|
||
extern const uint32_t RENAMED; | ||
|
||
void first(); | ||
|
||
void renamed(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#[no_mangle] | ||
static FIRST: u32 = 10; | ||
|
||
#[export_name = "RENAMED"] | ||
static SECOND: u32 = 42; | ||
|
||
#[no_mangle] | ||
extern "C" fn first() | ||
{ } | ||
|
||
#[export_name = "renamed"] | ||
extern fn second() | ||
{ } |