Mercurial Hosting > luan
diff http/src/luan/modules/http/HttpServicer.java @ 574:6cc2f047019b
remove LuanState.call()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 13 Jul 2015 12:31:53 -0600 |
parents | f1601a4ce1aa |
children | 60c549d43988 |
line wrap: on
line diff
--- a/http/src/luan/modules/http/HttpServicer.java Sun Jul 12 23:04:47 2015 -0600 +++ b/http/src/luan/modules/http/HttpServicer.java Mon Jul 13 12:31:53 2015 -0600 @@ -73,7 +73,8 @@ LuanTable module = (LuanTable)PackageLuan.require(luan,"luan:http/Http"); // request - LuanTable requestTbl = (LuanTable)luan.call( (LuanFunction)module.rawGet("new_request") ); + LuanFunction newRequestFn = (LuanFunction)module.rawGet("new_request"); + LuanTable requestTbl = (LuanTable)newRequestFn.call(luan); module.rawPut("request",requestTbl); requestTbl.rawPut("java",request); requestTbl.rawPut("method",request.getMethod()); @@ -151,10 +152,11 @@ // response LuanTable responseTbl = new LuanTable(); responseTbl.rawPut("java",response); - luan.call( (LuanFunction)module.rawGet("new_response"), new Object[]{responseTbl} ); + LuanFunction newResponseFn = (LuanFunction)module.rawGet("new_response"); + newResponseFn.call( luan, new Object[]{responseTbl} ); module.rawPut("response",responseTbl); - luan.call(fn,"<http>"); + fn.call(luan); return true; }