Browse Source

fix #5: passing tables as function parameters

v0.2.x
Brett Langdon 13 years ago
parent
commit
68bbc228d9
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      package.json
  2. +1
    -1
      src/utils.cc

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "nodelua", "name": "nodelua",
"version": "0.2.1",
"version": "0.2.2",
"description": "Lua Bindings For Node.JS", "description": "Lua Bindings For Node.JS",
"keywords": [ "keywords": [
"lua" "lua"


+ 1
- 1
src/utils.cc View File

@ -29,7 +29,7 @@ v8::Local<v8::Value> lua_to_value(lua_State* L, int i){
{ {
v8::Local<v8::Object> obj = v8::Object::New(); v8::Local<v8::Object> obj = v8::Object::New();
lua_pushnil(L); lua_pushnil(L);
while(lua_next(L, i-1) != 0){
while(lua_next(L, -2) != 0){
v8::Local<v8::Value> key = lua_to_value(L, -2); v8::Local<v8::Value> key = lua_to_value(L, -2);
v8::Local<v8::Value> value = lua_to_value(L, -1); v8::Local<v8::Value> value = lua_to_value(L, -1);
obj->Set(key, value); obj->Set(key, value);


Loading…
Cancel
Save