TICKET-388. ygol_engine_version() returns the string the build was given (build/windows.ps1 -Version, env YGOL_ENGINE_VERSION into a define by gframe/premake5.lua), "local" when none; static storage, no allocation. One new export, so the Windows export gate moves 333 -> 334 and the changelog gets its Unreleased row, all in this commit. Verified: build -Version v0.0.1 prints exports: 334 (expected 334); ctypes call prints v0.0.1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
29 lines
726 B
C++
29 lines
726 B
C++
#ifndef SERVERAPI_H
|
|
#define SERVERAPI_H
|
|
|
|
#ifdef __cplusplus
|
|
#define EXTERN_C extern "C"
|
|
#else
|
|
#define EXTERN_C
|
|
#endif
|
|
|
|
#ifndef YGOSERVER_API
|
|
#if defined(__EMSCRIPTEN__)
|
|
#include <emscripten/emscripten.h>
|
|
#define YGOSERVER_API EXTERN_C EMSCRIPTEN_KEEPALIVE
|
|
#elif defined(_WIN32)
|
|
#define YGOSERVER_API EXTERN_C __declspec(dllexport)
|
|
#else
|
|
#define YGOSERVER_API EXTERN_C __attribute__ ((visibility ("default")))
|
|
#endif
|
|
#endif
|
|
|
|
namespace ygo {
|
|
YGOSERVER_API int start_server(const char* args);
|
|
YGOSERVER_API void stop_server();
|
|
// [YGOL] the version the build was given (build/windows.ps1 -Version), "local" when none; static storage, never freed
|
|
YGOSERVER_API const char* ygol_engine_version();
|
|
}
|
|
|
|
#endif // !SERVERAPI_H
|