Merge branch 'ChaiScript_5_0_CPP_11' of https://github.com/ChaiScript/ChaiScript into ChaiScript_5_0_CPP_11
This commit is contained in:
@@ -50,7 +50,6 @@ namespace chaiscript
|
|||||||
default:
|
default:
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
throw chaiscript::detail::exception::bad_any_cast();
|
||||||
}
|
}
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -146,7 +145,6 @@ namespace chaiscript
|
|||||||
default:
|
default:
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
throw chaiscript::detail::exception::bad_any_cast();
|
||||||
}
|
}
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,7 +170,6 @@ namespace chaiscript
|
|||||||
default:
|
default:
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
throw chaiscript::detail::exception::bad_any_cast();
|
||||||
}
|
}
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -9,6 +9,11 @@
|
|||||||
#pragma warning(disable : 4190)
|
#pragma warning(disable : 4190)
|
||||||
#endif
|
#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()
|
CHAISCRIPT_MODULE_EXPORT chaiscript::ModulePtr create_chaiscript_module_chaiscript_stdlib()
|
||||||
{
|
{
|
||||||
@@ -16,6 +21,10 @@ CHAISCRIPT_MODULE_EXPORT chaiscript::ModulePtr create_chaiscript_module_chaiscr
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __llvm__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CHAISCRIPT_MSVC
|
#ifdef CHAISCRIPT_MSVC
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
34
src/main.cpp
34
src/main.cpp
@@ -23,6 +23,21 @@ char *mystrdup (const char *s) {
|
|||||||
return d; // Return the new string
|
return d; // Return the new string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* readline(const char* p)
|
||||||
|
{
|
||||||
|
std::string retval;
|
||||||
|
std::cout << p ;
|
||||||
|
std::getline(std::cin, retval);
|
||||||
|
return std::cin.eof() ? NULL : mystrdup(retval.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void add_history(const char*){}
|
||||||
|
void using_history(){}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void *cast_module_symbol(std::string (*t_path)())
|
void *cast_module_symbol(std::string (*t_path)())
|
||||||
{
|
{
|
||||||
union cast_union
|
union cast_union
|
||||||
@@ -38,9 +53,9 @@ void *cast_module_symbol(std::string (*t_path)())
|
|||||||
|
|
||||||
std::string default_search_path()
|
std::string default_search_path()
|
||||||
{
|
{
|
||||||
#ifdef CHAISCRIPT_WINDOWS
|
#ifdef CHAISCRIPT_WINDOWS // force no unicode
|
||||||
TCHAR path[2048];
|
CHAR path[4096];
|
||||||
int size = GetModuleFileName(0, path, sizeof(path)-1);
|
int size = GetModuleFileNameA(0, path, sizeof(path)-1);
|
||||||
|
|
||||||
std::string exepath(path, size);
|
std::string exepath(path, size);
|
||||||
|
|
||||||
@@ -101,19 +116,6 @@ std::string default_search_path()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char* readline(const char* p)
|
|
||||||
{
|
|
||||||
std::string retval;
|
|
||||||
std::cout << p ;
|
|
||||||
std::getline(std::cin, retval);
|
|
||||||
return std::cin.eof() ? NULL : mystrdup(retval.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_history(const char*){}
|
|
||||||
void using_history(){}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void help(int n) {
|
void help(int n) {
|
||||||
if ( n >= 0 ) {
|
if ( n >= 0 ) {
|
||||||
std::cout << "ChaiScript evaluator. To evaluate an expression, type it and press <enter>." << std::endl;
|
std::cout << "ChaiScript evaluator. To evaluate an expression, type it and press <enter>." << std::endl;
|
||||||
|
Reference in New Issue
Block a user