Skip to content

Commit

Permalink
Fixed compilation on g++4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ndob committed Mar 6, 2014
1 parent e7b3ff0 commit c1377bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
["OS=='linux'", {
"cflags": [
"-O2",
"-std=c++11",
"-std=c++0x",
"-pedantic-errors",
"-Wall",
"-fstrict-aliasing",
Expand Down
3 changes: 2 additions & 1 deletion src/run_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ Handle<Value> run(const Arguments& args)

auto apiCallbackFunc = Local<Function>::Cast(value);
auto persistentApiCallbackFunc = Persistent<Function>::New(apiCallbackFunc);
auto duktapeToNodeBridge = duktape::Callback([persistentApiCallbackFunc] (const std::string& parameter)
auto duktapeToNodeBridge =
duktape::Callback([persistentApiCallbackFunc] (const std::string& parameter) -> std::string
{
// We're on not on libuv/V8 main thread. Signal main to run
// callback function and wait for an answer.
Expand Down
3 changes: 2 additions & 1 deletion src/run_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Handle<Value> runSync(const Arguments& args)

Local<Function> apiCallbackFunc = Local<Function>::Cast(value);

auto duktapeToNodeBridge = duktape::Callback([apiCallbackFunc] (const std::string& paramString)
auto duktapeToNodeBridge =
duktape::Callback([apiCallbackFunc] (const std::string& paramString) -> std::string
{
Handle<Value> argv[1];
argv[0] = String::New(paramString.c_str());
Expand Down

0 comments on commit c1377bd

Please sign in to comment.