Get ChaiScript ported to MSVC 2013. See Notes in code.
This commit is contained in:
@@ -40,7 +40,10 @@ void do_work(chaiscript::ChaiScript &c, int id)
|
||||
int main()
|
||||
{
|
||||
// Disable deprecation warning for getenv call.
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef CHAISCRIPT_MSVC
|
||||
#ifdef max // Why microsoft? why?
|
||||
#undef max
|
||||
#endif
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
@@ -48,7 +51,7 @@ int main()
|
||||
const char *usepath = getenv("CHAI_USE_PATH");
|
||||
const char *modulepath = getenv("CHAI_MODULE_PATH");
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#ifdef CHAISCRIPT_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
@@ -29,12 +29,19 @@ int main()
|
||||
{
|
||||
chaiscript::ModulePtr m = chaiscript::ModulePtr(new chaiscript::Module());
|
||||
|
||||
/*
|
||||
chaiscript::utility::add_class<Test>(*m,
|
||||
"Test",
|
||||
{ chaiscript::constructor<Test ()>(),
|
||||
chaiscript::constructor<Test (const Test &)>() },
|
||||
{ {chaiscript::fun(&Test::count), "count"} }
|
||||
);
|
||||
*/
|
||||
|
||||
m->add(chaiscript::user_type<Test>(), "Test");
|
||||
m->add(chaiscript::constructor<Test()>(), "Test");
|
||||
m->add(chaiscript::constructor<Test(const Test &)>(), "Test");
|
||||
m->add(chaiscript::fun(&Test::count), "count");
|
||||
|
||||
chaiscript::ChaiScript chai;
|
||||
chai.add(m);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// Tests to make sure that the order in which function dispatches occur is correct
|
||||
|
||||
#include <chaiscript/chaiscript_defines.hpp>
|
||||
#include <chaiscript/dispatchkit/type_info.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
|
Reference in New Issue
Block a user