ChaiScript / ChaiScript
1
// This file is distributed under the BSD License.
2
// See "license.txt" for details.
3
// Copyright 2009-2012, Jonathan Turner (jonathan@emptycrate.com)
4
// Copyright 2009-2018, Jason Turner (jason@emptycrate.com)
5
// http://www.chaiscript.com
6

7
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
8
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
9

10
#include <chaiscript/chaiscript_basic.hpp>
11
#include <chaiscript/dispatchkit/bootstrap_stl.hpp>
12
#include <list>
13
#include <string>
14

15
// MSVC doesn't like that we are using C++ return types from our C declared module
16
// but this is the best way to do it for cross platform compatibility
17
#ifdef CHAISCRIPT_MSVC
18
#pragma warning(push)
19
#pragma warning(disable : 4190)
20
#endif
21

22
#ifdef __llvm__
23
#pragma clang diagnostic push
24
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
25
#endif
26

27 1
CHAISCRIPT_MODULE_EXPORT chaiscript::ModulePtr create_chaiscript_module_stl_extra() {
28 1
  auto module = std::make_shared<chaiscript::Module>();
29 1
  chaiscript::bootstrap::standard_library::list_type<std::list<chaiscript::Boxed_Value>>("List", *module);
30 1
  chaiscript::bootstrap::standard_library::vector_type<std::vector<uint16_t>>("u16vector", *module);
31 1
  module->add(chaiscript::vector_conversion<std::vector<uint16_t>>());
32 1
  return module;
33
}
34

35
#ifdef __llvm__
36
#pragma clang diagnostic pop
37
#endif
38

39
#ifdef CHAISCRIPT_MSVC
40
#pragma warning(pop)
41
#endif

Read our documentation on viewing source code .

Loading