Skip to content

Commit

Permalink
Fix example generate path.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Dec 13, 2019
1 parent b9e1864 commit 10da2bb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/c/address_book/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ generate:
rm -rf generated
mkdir -p generated
cd generated && \
env PYTHONPATH=../../.. \
env PYTHONPATH=../../../.. \
python3 -m pbtools generate_c_source ../address_book.proto
6 changes: 3 additions & 3 deletions examples/c/address_book/generated/address_book.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void address_book_person_phone_number_init(
struct address_book_person_phone_number_t *next_p)
{
self_p->base.heap_p = heap_p;
self_p->base.next_p = &next_p->base;
self_p->base.next_p = (struct pbtools_message_base_t *)next_p;
self_p->number_p = "";
self_p->type = 0;
}
Expand Down Expand Up @@ -119,7 +119,7 @@ void address_book_person_init(
struct address_book_person_t *next_p)
{
self_p->base.heap_p = heap_p;
self_p->base.next_p = &next_p->base;
self_p->base.next_p = (struct pbtools_message_base_t *)next_p;
self_p->name_p = "";
self_p->id = 0;
self_p->email_p = "";
Expand Down Expand Up @@ -267,7 +267,7 @@ void address_book_address_book_init(
struct address_book_address_book_t *next_p)
{
self_p->base.heap_p = heap_p;
self_p->base.next_p = &next_p->base;
self_p->base.next_p = (struct pbtools_message_base_t *)next_p;
self_p->people.length = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/c/hello_world/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ generate:
rm -rf generated
mkdir -p generated
cd generated && \
env PYTHONPATH=../../.. \
env PYTHONPATH=../../../.. \
python3 -m pbtools generate_c_source ../hello_world.proto
2 changes: 1 addition & 1 deletion examples/c/hello_world/generated/hello_world.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void hello_world_foo_init(
struct hello_world_foo_t *next_p)
{
self_p->base.heap_p = heap_p;
self_p->base.next_p = &next_p->base;
self_p->base.next_p = (struct pbtools_message_base_t *)next_p;
self_p->bar = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/c/oneof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ generate:
rm -rf generated
mkdir -p generated
cd generated && \
env PYTHONPATH=../../.. \
env PYTHONPATH=../../../.. \
python3 -m pbtools generate_c_source ../oneof.proto
2 changes: 1 addition & 1 deletion examples/c/oneof/generated/oneof.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void oneof_foo_init(
struct oneof_foo_t *next_p)
{
self_p->base.heap_p = heap_p;
self_p->base.next_p = &next_p->base;
self_p->base.next_p = (struct pbtools_message_base_t *)next_p;
self_p->bar.choice = 0;
}

Expand Down

0 comments on commit 10da2bb

Please sign in to comment.