Update of /cvsroot/luabind/luabind/luabind/examples/filesystem
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15879/luabind/examples/filesystem
Modified Files:
Jamfile filesystem.cpp
Log Message:
merged in changes from beta7-devel2 (tag: beta7-devel2-merge)
Index: Jamfile
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/examples/filesystem/Jamfile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Jamfile 4 Apr 2004 16:28:26 -0000 1.1
+++ Jamfile 28 Nov 2005 20:55:34 -0000 1.2
@@ -5,8 +5,10 @@
use-project /boost : $(BOOST_ROOT) ;
exe filesystem
- : filesystem.cpp directory_iterator.hpp
+ : filesystem.cpp
/boost/filesystem//boost_filesystem/<link>static
/luabind//luabind
;
+stage . : filesystem ;
+
Index: filesystem.cpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/examples/filesystem/filesystem.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- filesystem.cpp 10 Aug 2004 23:04:58 -0000 1.8
+++ filesystem.cpp 28 Nov 2005 20:55:34 -0000 1.9
@@ -7,18 +7,6 @@
#include "lualib.h"
}
-bool dostring(lua_State* L, const char* str)
-{
- if (luaL_loadbuffer(L, str, std::strlen(str), str) || lua_pcall(L, 0, 0, 0))
- {
- const char* a = lua_tostring(L, -1);
- std::cout << a << "\n";
- lua_pop(L, 1);
- return true;
- }
- return false;
-}
-
#include <luabind/luabind.hpp>
#include <luabind/operator.hpp>
#include <boost/filesystem/operations.hpp>
@@ -100,7 +88,9 @@
if (argc < 2)
{
- std::cout << "usage: filesystem filename [args]\n";
+ std::cout << "This example will bind parts of the boost.Filesystem library\n"
+ "and then run the given lua file.\n\n"
+ "usage: filesystem filename [args]\n";
return 1;
}
@@ -118,9 +108,7 @@
}
args["n"] = argc;
-
- object globals = get_globals(L);
- globals["args"] = args;
+ globals(L)["args"] = args;
lua_dofile(L, argv[1]);
}
|