starwing / lua-protobuf

A Lua module to work with Google protobuf
MIT License
1.75k stars 387 forks source link

是否支持any #44

Closed yiyucyp closed 6 years ago

starwing commented 6 years ago

可以手动处理,但是应该没有直接支持……想问下官方的protobuf对any是直接支持的么?应该也是通过额外的代码实现的吧?

xtutu commented 6 years ago

golang 中是直接支持的。 https://github.com/golang/protobuf/blob/master/ptypes/any.go

starwing commented 6 years ago

你看,也是额外写了代码对不对?这些我的理解是类似contrib之类的东西,你可以自己写代码解析嘛~不太需要在核心里做,毕竟这是个纯C的库,并不包括Lua代码对不对?(protoc.lua是个独立模块)