pbc
pbc copied to clipboard
A protocol buffers library for C
1. Now, We can use cmake to build pbc.(with all architecture supported) 2. add scripts to build pbc for iOS and Android --- I use this functions to create .a...
我在 openresty里使用 pbc,注册 pb 文件(执行parser.register)的时候报错,版本是lua 5.1。我用wiki 里的测试 pb 文件(addressbook.proto)是没问题的。 下面是 pb 文件。我尝试将ReqBody和ReqBody删除后,文件就能注册成功了。麻烦帮忙看下,是 pb 文件本身的问题,还是解析的问题?多谢。 ``` package page; message StringPair { required bytes key = 1; optional bytes value = 2;...
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
在lua中,test.proto message A{ enum { B = 1; }; }; pb:register 'test.pb'后 在lua怎么拿到 B的值
具体代码说明下问题吧: 消息定义: message refine_set { optional int32 set_attrs = 1; optional int32 set_quality = 2; } message rep_E_C2S_EQUIP_GET_REFINE { optional int32 isok = 1; repeated refine_set sets = 2; }...
热更新pb
我们在项目中用了pbc来和客户端交互,在个别情况下,策划可能需要对协议做一些热更新(比如在客户端多显示一个XX值) pbc有办法将register到环境里的数据删掉重新register一遍么?或者直接更新的方法
optional int32 的字段如果赋值为0, encode 的时候好像没有把这个字段encode 进去, decode的时候也没有应字段的值
以下两种情况parse异常 message PB_A { optional int32 a = 1 [default=-1]; } message PB_B { optional double f = 1 [default=0.0]; }
b.proto message Person { optional int32 age = 1; optional string name = 2; } a.proto import "b.proto"; message AAA { optional Person player = 1; } /////////////////////////////////////////////////////////////////////////// 如果用parser.register({"a.proto", "b.proto"},...
I am using this lua binding module https://raw.githubusercontent.com/cloudwu/pbc/master/binding/lua53/protobuf.lua but when I want to encode someting like this, it will show an error below ``` protobuf.lua:217: attempt to call local 'func'...