Browse Source

Merge remote-tracking branch 'origin/v0.3.x'

pull/8/merge v0.3.0
Brett Langdon 12 years ago
parent
commit
f0890024dd
4 changed files with 11 additions and 6 deletions
  1. +6
    -2
      examples/functions/index.js
  2. +2
    -2
      package.json
  3. +2
    -2
      src/luastate.cc
  4. +1
    -0
      src/utils.h

+ 6
- 2
examples/functions/index.js View File

@ -9,5 +9,9 @@ lua.registerFunction('add', function(a, b){
lua.doStringSync("print('Result in Lua: ' .. add(10, 5))");
var lua_two = new nodelua.LuaState('two');
// this will throw an error
lua_two.doStringSync("add(10, 5)");
try{
lua_two.doStringSync("add(10, 5)");
} catch(e){
console.log("Error: ");
console.log(e);
}

+ 2
- 2
package.json View File

@ -1,6 +1,6 @@
{
"name": "nodelua",
"version": "0.2.3",
"version": "0.3.0",
"description": "Lua Bindings For Node.JS",
"keywords": [
"lua"
@ -19,7 +19,7 @@
"license": "MIT",
"gypfile": true,
"engines": {
"node": ">=0.8.0 <0.10.0"
"node": ">=0.10.0"
},
"engineStrict": true
}

+ 2
- 2
src/luastate.cc View File

@ -48,7 +48,7 @@ void do_status(uv_work_t *req){
}
void simple_after(uv_work_t *req){
void simple_after(uv_work_t *req, int status){
HandleScope scope;
simple_baton* baton = static_cast<simple_baton*>(req->data);
@ -81,7 +81,7 @@ void do_string(uv_work_t *req){
}
void async_after(uv_work_t *req){
void async_after(uv_work_t *req, int status){
HandleScope scope;
async_baton* baton = (async_baton *)req->data;


+ 1
- 0
src/utils.h View File

@ -1,6 +1,7 @@
#ifndef LUAUTILS_H
#define LUAUTILS_H
#include <string.h>
#include <node.h>
extern "C"{


Loading…
Cancel
Save