From 3c6089c3fe2cf40df7351048bd698ac8d1fc0157 Mon Sep 17 00:00:00 2001 From: ccleavinger <96743974+ccleavinger@users.noreply.github.com> Date: Sat, 10 Feb 2024 11:41:24 -0600 Subject: [PATCH] Update cyber.h added extern "C" if using C++ compiler and prevented redefinitions from occurring. --- src/include/cyber.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/include/cyber.h b/src/include/cyber.h index c2e7cfed2..52c0ae7e8 100644 --- a/src/include/cyber.h +++ b/src/include/cyber.h @@ -3,6 +3,12 @@ #include #include +#ifndef CYBER_H +#define CYBER_H + +#ifdef __cplusplus +extern "C" { +#endif typedef struct CsVM CsVM; typedef uint64_t CsValue; @@ -432,4 +438,10 @@ void csListInsert(CsVM* vm, CsValue list, size_t idx, CsValue val); // CsValue csMapGet(CsVM* vm, CsValue map, CsValue key); // CsValue csMapGetStringKey(CsVM* vm, CsValue map, CsStr key); // void csMapSet(CsVM* vm, CsValue map, CsValue key, CsValue val); -// void csMapSetStringKey(CsVM* vm, CsValue map, CsStr key, CsValue val); \ No newline at end of file +// void csMapSetStringKey(CsVM* vm, CsValue map, CsStr key, CsValue val); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +#endif // !CYBER_H \ No newline at end of file