Mercurial Hosting > luan
comparison src/luan/modules/Rpc.luan @ 1261:198d6af7330a
rename Luan.to_table to Table.java_to_table_shallow and Luan.to_luan to Table.java_to_table_deep
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 24 Sep 2018 13:09:16 -0600 |
parents | 4b5b84853f6f |
children | 781ec0a92bb5 |
comparison
equal
deleted
inserted
replaced
1260:4b5b84853f6f | 1261:198d6af7330a |
---|---|
17 local error = Luan.error | 17 local error = Luan.error |
18 local set_metatable = Luan.set_metatable or error() | 18 local set_metatable = Luan.set_metatable or error() |
19 local try = Luan.try or error() | 19 local try = Luan.try or error() |
20 local ipairs = Luan.ipairs or error() | 20 local ipairs = Luan.ipairs or error() |
21 local type = Luan.type or error() | 21 local type = Luan.type or error() |
22 local to_luan = Luan.to_luan or error() | |
23 local Io = require "luan:Io.luan" | 22 local Io = require "luan:Io.luan" |
24 local Thread = require "luan:Thread.luan" | 23 local Thread = require "luan:Thread.luan" |
25 local Table = require "luan:Table.luan" | 24 local Table = require "luan:Table.luan" |
25 local java_to_table_deep = Table.java_to_table_deep or error() | |
26 local unpack = Table.unpack or error() | 26 local unpack = Table.unpack or error() |
27 local Logging = require "luan:logging/Logging.luan" | 27 local Logging = require "luan:logging/Logging.luan" |
28 local logger = Logging.logger "Rpc" | 28 local logger = Logging.logger "Rpc" |
29 | 29 |
30 | 30 |
52 end | 52 end |
53 return unpack(list) | 53 return unpack(list) |
54 end | 54 end |
55 | 55 |
56 local function luan_args(list,binary_in) | 56 local function luan_args(list,binary_in) |
57 list = to_luan(list) | 57 list = java_to_table_deep(list) |
58 if binary_in ~= nil then | 58 if binary_in ~= nil then |
59 local i_in = list[#list] | 59 local i_in = list[#list] |
60 list[#list] = nil | 60 list[#list] = nil |
61 local type = list[i_in] | 61 local type = list[i_in] |
62 if type == "binary" then | 62 if type == "binary" then |