Revision 592cacc7bd29e40eaa8a47f0db60605ec8fda5f9 authored by DilumAluthgeBot on 11 October 2021, 05:46:58 UTC, committed by GitHub on 11 October 2021, 05:46:58 UTC
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
1 parent bc89d83
jl_exports.h
// 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 pointer data as `const void * $(name);`
#define XX(name) JL_DLLEXPORT const void * name;
JL_EXPORTED_DATA_POINTERS(XX)
#undef XX
// Define symbol data as `$(type) $(name);`
#define XX(name, type) JL_DLLEXPORT type name;
JL_EXPORTED_DATA_SYMBOLS(XX)
#undef XX
// Declare list of exported functions (sans type)
#define XX(name) JL_DLLEXPORT void name(void);
typedef void (anonfunc)(void);
JL_RUNTIME_EXPORTED_FUNCS(XX)
#ifdef _OS_WINDOWS_
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
#endif
JL_CODEGEN_EXPORTED_FUNCS(XX)
#undef XX
// Define holder locations for function addresses as `const void * $(name)_addr = NULL;
#define XX(name) JL_HIDDEN anonfunc * name##_addr = NULL;
JL_RUNTIME_EXPORTED_FUNCS(XX)
#ifdef _OS_WINDOWS_
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
#endif
JL_CODEGEN_EXPORTED_FUNCS(XX)
#undef XX
// Generate lists of function names and addresses
#define XX(name) "i" #name,
static const char *const jl_runtime_exported_func_names[] = {
JL_RUNTIME_EXPORTED_FUNCS(XX)
#ifdef _OS_WINDOWS_
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
#endif
NULL
};
#undef XX
#define XX(name) #name"_impl",
static const char *const jl_codegen_exported_func_names[] = {
JL_CODEGEN_EXPORTED_FUNCS(XX)
NULL
};
#undef XX
#define XX(name) #name"_fallback",
static const char *const jl_codegen_fallback_func_names[] = {
JL_CODEGEN_EXPORTED_FUNCS(XX)
NULL
};
#undef XX
#define XX(name) &name##_addr,
static anonfunc **const jl_runtime_exported_func_addrs[] = {
JL_RUNTIME_EXPORTED_FUNCS(XX)
#ifdef _OS_WINDOWS_
JL_RUNTIME_EXPORTED_FUNCS_WIN(XX)
#endif
NULL
};
static anonfunc **const jl_codegen_exported_func_addrs[] = {
JL_CODEGEN_EXPORTED_FUNCS(XX)
NULL
};
#undef XX
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...