mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
I initially tried to use the existing .clang-format file, but it does not match the code style (at least with clang-format 11) and the formatting is not consistent across files. Therefore, I decided to rewrite the .clang-format with some personal preferences. Used command find . -iname "*.hpp" -o -iname "*.cpp" | xargs clang-format -i -style=file
27 lines
639 B
C++
27 lines
639 B
C++
|
|
#include <chaiscript/chaiscript_stdlib.hpp>
|
|
|
|
// MSVC doesn't like that we are using C++ return types from our C declared module
|
|
// but this is the best way to do it for cross platform compatibility
|
|
#ifdef CHAISCRIPT_MSVC
|
|
#pragma warning(push)
|
|
#pragma warning(disable : 4190)
|
|
#endif
|
|
|
|
#ifdef __llvm__
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
|
|
#endif
|
|
|
|
CHAISCRIPT_MODULE_EXPORT chaiscript::ModulePtr create_chaiscript_module_chaiscript_stdlib() {
|
|
return chaiscript::Std_Lib::library();
|
|
}
|
|
|
|
#ifdef __llvm__
|
|
#pragma clang diagnostic pop
|
|
#endif
|
|
|
|
#ifdef CHAISCRIPT_MSVC
|
|
#pragma warning(pop)
|
|
#endif
|