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/TypeChecker.hpp>
6
7namespace Ark
8{
9 struct mapping
10 {
11 const char* name;
12 Value (*value)(std::vector<Value>&, VM*);
13 };
14}
15
16#undef ARK_API
17
18#ifdef ARK_OS_WINDOWS
19// Windows compilers need specific (and different) keywords for export and import
20# define ARK_API extern "C" __declspec(dllexport)
21#else // Linux, FreeBSD, Mac OS X
22# if __GNUC__ >= 4
23// GCC 4 has special keywords for showing/hiding symbols,
24// the same keyword is used for both importing and exporting
25# define ARK_API extern "C" __attribute__((__visibility__("default")))
26# else
27// GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
28# define ARK_API extern "C"
29# endif
30#endif
31
32#endif
The ArkScript virtual machine.
The ArkScript virtual machine, executing ArkScript bytecode.
Definition VM.hpp:44
const char * name
Definition Module.hpp:11
Value(* value)(std::vector< Value > &, VM *)
Definition Module.hpp:12