You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
735 B
26 lines
735 B
// Bridges the working TU `capi-bridge.cpp`, which handles interfacing with rngxx's C++ API, and the C API shim TU defined in `capi.c`
|
|
// This file must be useable by both C and C++ compilers, and everything here must have C linkage
|
|
//
|
|
// Other headers shouldn't be included here. The only ones included are included for the types they define
|
|
#ifndef _RNG_CAPI_BRIDGE_H
|
|
#define _RNG_CAPI_BRIDGE_H
|
|
|
|
#define _RNGXX_IMPL_ONLY_TYPES
|
|
#include <rngxx.h>
|
|
#undef _RNGXX_IMPL_ONLY_TYPES
|
|
#include <common.h>
|
|
|
|
#define RNG_IMPL(name) _rng__internal_ ## name
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
rng_t* RNG_IMPL(mkdriver)(enum rng_kind kind, u64* restrict seed) _export(internal);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _RNG_CAPI_BRIDGE_H */
|