Skip to content

Commit

Permalink
Update cyber.h (#82)
Browse files Browse the repository at this point in the history
added extern "C" if using C++ compiler and prevented redefinitions from occurring.
  • Loading branch information
ccleavinger authored Feb 10, 2024
1 parent 241a414 commit 8e22d34
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/include/cyber.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
#include <stdint.h>
#include <stddef.h>

#ifndef CYBER_H
#define CYBER_H

#ifdef __cplusplus
extern "C" {
#endif
typedef struct CsVM CsVM;

typedef uint64_t CsValue;
Expand Down Expand Up @@ -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);
// void csMapSetStringKey(CsVM* vm, CsValue map, CsStr key, CsValue val);

#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus

#endif // !CYBER_H

0 comments on commit 8e22d34

Please sign in to comment.