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

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

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

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

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

37
#ifdef __llvm__
38
#pragma clang diagnostic pop
39
#endif
40

41
#ifdef CHAISCRIPT_MSVC
42
#pragma warning(pop)
43
#endif

Read our documentation on viewing source code .

Loading