Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
d61e6adf
Commit
d61e6adf
authored
Aug 20, 2015
by
Josh Haberman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return TypedData_Wrap_Struct directly.
Change-Id: I6cf77f01370204ad4bc7b345a040a9a3de1706a0
parent
a1daeaba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
map.c
ruby/ext/google/protobuf_c/map.c
+1
-2
repeated_field.c
ruby/ext/google/protobuf_c/repeated_field.c
+1
-2
No files found.
ruby/ext/google/protobuf_c/map.c
View file @
d61e6adf
...
...
@@ -167,10 +167,9 @@ void Map_free(void* _self) {
VALUE
Map_alloc
(
VALUE
klass
)
{
Map
*
self
=
ALLOC
(
Map
);
VALUE
ret
=
TypedData_Wrap_Struct
(
klass
,
&
Map_type
,
self
);
memset
(
self
,
0
,
sizeof
(
Map
));
self
->
value_type_class
=
Qnil
;
return
ret
;
return
TypedData_Wrap_Struct
(
klass
,
&
Map_type
,
self
)
;
}
static
bool
needs_typeclass
(
upb_fieldtype_t
type
)
{
...
...
ruby/ext/google/protobuf_c/repeated_field.c
View file @
d61e6adf
...
...
@@ -606,13 +606,12 @@ void RepeatedField_free(void* _self) {
*/
VALUE
RepeatedField_alloc
(
VALUE
klass
)
{
RepeatedField
*
self
=
ALLOC
(
RepeatedField
);
VALUE
ret
=
TypedData_Wrap_Struct
(
klass
,
&
RepeatedField_type
,
self
);
self
->
elements
=
NULL
;
self
->
size
=
0
;
self
->
capacity
=
0
;
self
->
field_type
=
-
1
;
self
->
field_type_class
=
Qnil
;
return
ret
;
return
TypedData_Wrap_Struct
(
klass
,
&
RepeatedField_type
,
self
)
;
}
VALUE
RepeatedField_init
(
int
argc
,
VALUE
*
argv
,
VALUE
self
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment