forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[loader]: Re-export symbols for C embedding, rename to `libjulia-inte…
…rnal` (JuliaLang#38160)
- Loading branch information
1 parent
5b6a081
commit 2e3364e
Showing
44 changed files
with
1,653 additions
and
548 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,31 @@ | ||
// This file is a part of Julia. License is MIT: https://julialang.org/license | ||
// Bring in the curated lists of exported data and function symbols, then | ||
// perform C preprocessor magic upon them to generate lists of declarations and | ||
// functions to re-export our function symbols from libjulia-internal to libjulia. | ||
#include "../src/jl_exported_data.inc" | ||
#include "../src/jl_exported_funcs.inc" | ||
|
||
// Define data symbols as `const void * $(name);` | ||
#define XX(name) JL_DLLEXPORT const void * name; | ||
JL_EXPORTED_DATA(XX) | ||
#undef XX | ||
|
||
// Define holder locations for function addresses as `const void * $(name)_addr` | ||
#define XX(name) JL_HIDDEN const void * name##_addr; | ||
JL_EXPORTED_FUNCS(XX) | ||
#undef XX | ||
|
||
// Generate lists of function names and addresses | ||
#define XX(name) #name, | ||
static const char *const jl_exported_func_names[] = { | ||
JL_EXPORTED_FUNCS(XX) | ||
NULL | ||
}; | ||
#undef XX | ||
|
||
#define XX(name) &name##_addr, | ||
static const void ** jl_exported_func_addrs[] = { | ||
JL_EXPORTED_FUNCS(XX) | ||
NULL | ||
}; | ||
#undef XX |
Oops, something went wrong.