Comments (3)
here is my solution for this problem, put this variables into a table named 'pb', modify protoc-gen-lua to below:
line 251: obj_name = 'pb.' + full_name.upper().replace('.', '') + 'ENUM'
line 253: "%s = protobuf.EnumValueDescriptor();\n"% obj_name
line 267: obj_name = 'pb.' + full_name.upper().replace('.', '')
line 269: "%s = protobuf.EnumDescriptor();\n"% obj_name
line 287: obj_name = 'pb.' + full_name.upper().replace('.', '') + 'FIELD'
line 289: "%s = protobuf.FieldDescriptor();\n"% obj_name
line 319: type_name = 'pb.' + env.get_ref_name(field_desc.type_name).upper().replace('.', '')
line 326: type_name = 'pb.' + env.get_ref_name(field_desc.extendee)
line 339: obj_name = 'pb.' + full_name.upper().replace('.', '_')
line 341: "%s = protobuf.Descriptor();\n"% obj_name
insert before line 418: lua("local pb = {}\n")
from protoc-gen-lua.
@kueiwoodwolf thanks a lot ,this help me !
from protoc-gen-lua.
@chiuan my pleasure:)
from protoc-gen-lua.
Related Issues (20)
- ClearField function and nil reference
- Have a plan to support Protocol Buffers v3.0.0? HOT 4
- report one bug for enum in protoc-gen-lua script
- How to get descriptor from Message?
- error in _AddSetListenerMethod (protobuf.lua line:592) HOT 2
- recommend one fork support lua53 HOT 1
- 序列化结果是乱序的
- error running example test.lua HOT 2
- error main function has more than 200 local variables
- protobuf.lua:752: attempt to call field 'append' (a nil value)
- 希望能够支持proto3版本
- 支持主流的protobuf 3.x HOT 3
- 请问是线程安全的吗?
- Windows support?
- 请问下能否支持python3环境?
- 请问可以从PB文件逆向为.proto文件吗
- 对python3的支持
- python3的支持
- 怎么编译proto-gen-lua,在mac下只编译出pb.so
- 作者还维护吗?
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 protoc-gen-lua.