Reputation: 877
I am not sure how to represent pointers in protobuf-c.
When there is a structure like the following
struct EXAMPLE1
{
int32 x;
int32 *y;
};
how would I represent the pointer variable (y) in protobuf-c?
message EXAMPLE1
{
int32 x;
?? y;
}
Upvotes: 6
Views: 8098
Reputation: 12156
Pointer values make sense only within one computer and one running application. Protocol buffers is designed to communicate between separate systems, therefore it does not contain a method to transfer pointers.
Instead, put the integer directly in the structure, or find some other way (array index, unique id) to reconstruct the pointer on the receiving end.
Upvotes: 5