Loadable module support can be disabled by defining CHAISCRIPT_NO_DYNLOAD
This commit is contained in:
parent
244b5b224b
commit
698dfb06db
@ -36,12 +36,13 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_VERSION) && !defined(__CYGWIN__)
|
||||
#if !defined(CHAISCRIPT_NO_DYNLOAD) && defined(_POSIX_VERSION) && !defined(__CYGWIN__)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CHAISCRIPT_WINDOWS
|
||||
#if defined(CHAISCRIPT_NO_DYNLOAD)
|
||||
#include "chaiscript_unknown.hpp"
|
||||
#elif defined(CHAISCRIPT_WINDOWS)
|
||||
#include "chaiscript_windows.hpp"
|
||||
#elif _POSIX_VERSION
|
||||
#include "chaiscript_posix.hpp"
|
||||
|
@ -16,7 +16,11 @@ namespace chaiscript
|
||||
{
|
||||
Loadable_Module(const std::string &, const std::string &)
|
||||
{
|
||||
#ifdef CHAISCRIPT_NO_DYNLOAD
|
||||
throw chaiscript::exception::load_module_error("Loadable module support was disabled (CHAISCRIPT_NO_DYNLOAD)");
|
||||
#else
|
||||
throw chaiscript::exception::load_module_error("Loadable module support not available for your platform");
|
||||
#endif
|
||||
}
|
||||
|
||||
ModulePtr m_moduleptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user