Open YvanWan opened 1 year ago
在使用pb.decode过程中,我得到报错: bad argument #2 to 'decode' (string/buffer/slice expected, got userdata) 数据是从go服务端传过来的byte[] 数据,我改如何构建成为 tring/buffer/slice类型?
请更具体地描述类型。你需要获得 byte[] 的长度和首个元素的指针,然后用 ffi.string 转换到 Lua string.
在使用pb.decode过程中,我得到报错: bad argument #2 to 'decode' (string/buffer/slice expected, got userdata) 数据是从go服务端传过来的byte[] 数据,我改如何构建成为 tring/buffer/slice类型?