Comments (5)
你是不是没有安装protobuf
或者安装的protobuf的版本不对
from luapb.
你好,现在可以跑起来了。但是还有一点不明白,请教一下:
pb_parseFromString里边调用的是message->ParseFromArray(bin, bin_len); 而pb_serializeToString里边却是调用message->SerializeToString(&msg);
ParseFromArray和SerializeToArray, 以及ParseFromString和SerializeToString不是承兑出现的吗?
from luapb.
嗯 应该是要像你说的才对。
from luapb.
如果要用SerializeToArray,lua怎么实现呢?不能使用lua_pushlstring这个函数了吧,有其他函数可以实现这个功能吗?
from luapb.
我的理解是 SerializeToArray 和 SerializeToString 差不多的
对于lua层来说,都是把string当成数组
你把lua层传进来的string 当成数组处理一下看看吧 应该是一样的效果
当然要考虑会不会string被截断的问题。
from luapb.
Related Issues (15)
- attempt to index local 'msg' (a userdata value) HOT 10
- TYPE_SFIXED32 missing
- 不改代码情况下 XLua 可以用么 HOT 1
- bool类型赋值失败 HOT 7
- 编译dll和so问题
- NEED LICENSE
- repeated filed,多次add有问题 HOT 16
- 如何使用 HOT 35
- error in LuaPB.cc function pb_set at line 452 HOT 1
- There is no: field->type() == google::protobuf::FieldDescriptor::TYPE_MESSAGE HOT 12
- 用于安卓时,import无法读入文件
- 不支持枚举类型
- 怎么在C++ 把类传到lua中? lua 怎么使用,说是 usedata 不能使用 HOT 2
- 请问支持service吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luapb.