ArkScript
A small, fast, functional and scripting language for video games
Module.hpp
Go to the documentation of this file.
1#ifndef INCLUDE_ARK_MODULE_HPP
2#define INCLUDE_ARK_MODULE_HPP
3
4#include <Ark/VM/VM.hpp>
5#include <Ark/Platform.hpp>
6#include <Ark/TypeChecker.hpp>
7
8namespace Ark
9{
10 struct mapping
11 {
12 const char* name;
13 Value (*value)(std::vector<Value>&, Ark::VM*);
14 };
15}
16
17#undef ARK_API
18
19#ifdef ARK_OS_WINDOWS
20// Windows compilers need specific (and different) keywords for export and import
21# define ARK_API extern "C" __declspec(dllexport)
22#else // Linux, FreeBSD, Mac OS X
23# if __GNUC__ >= 4
24// GCC 4 has special keywords for showing/hidding symbols,
25// the same keyword is used for both importing and exporting
26# define ARK_API extern "C" __attribute__((__visibility__("default")))
27# else
28// GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
29# define ARK_API extern "C"
30# endif
31#endif
32
33#endif
ArkScript configuration macros.
The ArkScript virtual machine.
The ArkScript virtual machine, executing ArkScript bytecode.
Definition: VM.hpp:48
Definition: Builtins.hpp:21
const char * name
Definition: Module.hpp:12
Value(* value)(std::vector< Value > &, Ark::VM *)
Definition: Module.hpp:13