summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/BLua.h4
-rw-r--r--lib/BLua.cc7
2 files changed, 7 insertions, 4 deletions
diff --git a/include/BLua.h b/include/BLua.h
index 2b9e1b9..b579333 100644
--- a/include/BLua.h
+++ b/include/BLua.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: BLua.h,v 1.30 2007-04-02 23:34:30 pixel Exp $ */
+/* $Id: BLua.h,v 1.31 2007-04-11 00:16:30 pixel Exp $ */
#ifndef __BLUA_H__
#define __BLUA_H__
@@ -51,7 +51,7 @@ class Lua : public Base {
virtual ~Lua();
void open_base();
void open_table();
- void open_io();
+ void open_io(bool safe = true);
void open_string();
void open_math();
void open_debug();
diff --git a/lib/BLua.cc b/lib/BLua.cc
index fa35f9f..3f7df94 100644
--- a/lib/BLua.cc
+++ b/lib/BLua.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: BLua.cc,v 1.39 2007-04-02 23:34:30 pixel Exp $ */
+/* $Id: BLua.cc,v 1.40 2007-04-11 00:16:30 pixel Exp $ */
#include <stdlib.h>
#include "BLua.h"
@@ -453,7 +453,7 @@ void Lua::open_table() {
unlock();
}
-void Lua::open_io() {
+void Lua::open_io(bool safe) {
lock();
luaopen_io(L);
lua_pop(L, 1);
@@ -774,6 +774,9 @@ String Lua::escape_string(const String & s) {
case '\n':
r += "\n";
break;
+ case '\r':
+ r += "\r";
+ break;
case '\0':
r += "\\000";
break;