Revision 3be9b23e5d09ab94283f4be2030b0b0a32f3eee4 authored by Ian McInerney on 20 December 2020, 01:36:57 UTC, committed by KristofferC on 27 December 2020, 09:50:54 UTC
JL_DLLEXPORT should be used because it will automatically switch between importing and exporting the symbol as needed. (cherry picked from commit f6b0edce993638a021094c1a84f6ca76c1fb52ee)
1 parent 8984d13
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 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
Computing file changes ...