protobuf-generate 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/protobuf/generate/language/c/c.erb +3 -1
- data/protobuf-generate.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d33ecf2d7d77a5e6683308ae910c137103c6e2
|
4
|
+
data.tar.gz: 3b9bcae4f9cb5a4b0f8a6345a41d005fa281ca80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f8f7ed76f4b78ccb68c64aaeb8d4f7866d90b6741cecc06856a83bfdfea1fab9a52a88f2f1eeb1e2fddeec7bf81a47a0ecf23039cb4170c3f4636c21c288fdc
|
7
|
+
data.tar.gz: 46bd074d37993af2b63f7ba3deb5bf4105a167f736e8b1af6d5d5cb172f0e819c8594fbf84ad8a0f9b08e707d5b69043a479c27436a3c25c7ecdf948acd57778
|
data/README.md
CHANGED
@@ -77,11 +77,13 @@ static int write_raw_varint64(uint64_t value, uint8_t *buffer, int offset) {
|
|
77
77
|
}
|
78
78
|
<% end %>
|
79
79
|
|
80
|
+
<% if type_count(:string, :bytes) > 0 %>
|
80
81
|
static int write_raw_bytes(uint8_t *bytes, int bytes_size, uint8_t *buffer, int offset) {
|
81
82
|
for (int i = 0; i < bytes_size; ++i)
|
82
83
|
offset = write_raw_byte(*(bytes + i), buffer, offset);
|
83
84
|
return offset;
|
84
85
|
}
|
86
|
+
<% end %>
|
85
87
|
|
86
88
|
static inline uint32_t encode_zig_zag32(int32_t n) {
|
87
89
|
return (n << 1) ^ (n >> 31);
|
@@ -435,7 +437,7 @@ static int read_raw_varint64(uint64_t *tag, const uint8_t *buffer, int offset) {
|
|
435
437
|
}
|
436
438
|
|
437
439
|
int <%= function exp.package, exp.name, 'encode' %>(const <%= type exp.package, exp.name %> *pb, uint8_t *data, size_t data_size, size_t *encoded_size) {
|
438
|
-
*encoded_size = <%= function exp.package, exp.name, 'write'
|
440
|
+
*encoded_size = <%= function exp.package, exp.name, 'write' %>(pb, data, 0);
|
439
441
|
return 0; // TODO: Encoding errors.
|
440
442
|
}
|
441
443
|
|
data/protobuf-generate.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
s.name = 'protobuf-generate'
|
5
|
-
s.version = '0.2.
|
5
|
+
s.version = '0.2.1'
|
6
6
|
s.summary = 'A multi-language concrete protobuf code generator.'
|
7
7
|
s.description = 'A simple PEG parser, AST and template based approach to code generation.'
|
8
8
|
s.authors = ['Shane Hanna']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf-generate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Hanna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|