diff options
Diffstat (limited to 'examples/simple')
| -rw-r--r-- | examples/simple/Makefile | 2 | ||||
| -rw-r--r-- | examples/simple/nim.cfg | 2 | ||||
| -rw-r--r-- | examples/simple/simple_pb.nim | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/examples/simple/Makefile b/examples/simple/Makefile index 1da2b45..4e03fe4 100644 --- a/examples/simple/Makefile +++ b/examples/simple/Makefile @@ -4,4 +4,4 @@ simple: simple.nim simple_pb.nim nim c $< %_pb.nim: %.proto - nimpb_build -I=. --out=. $< + ../../nimpb/compiler/nimpb_build -I=. --out=. $< diff --git a/examples/simple/nim.cfg b/examples/simple/nim.cfg index 11736fc..1c2f0c1 100644 --- a/examples/simple/nim.cfg +++ b/examples/simple/nim.cfg @@ -1 +1 @@ ---path:"../../src" +--path:"../.." diff --git a/examples/simple/simple_pb.nim b/examples/simple/simple_pb.nim index 56d4afb..a594803 100644 --- a/examples/simple/simple_pb.nim +++ b/examples/simple/simple_pb.nim @@ -18,6 +18,7 @@ type proc newTest1*(): Test1 proc newTest1*(data: string): Test1 +proc newTest1*(data: seq[byte]): Test1 proc writeTest1*(stream: Stream, message: Test1) proc readTest1*(stream: Stream): Test1 proc sizeOfTest1*(message: Test1): uint64 @@ -114,4 +115,9 @@ proc newTest1*(data: string): Test1 = ss = newStringStream(data) result = readTest1(ss) +proc newTest1*(data: seq[byte]): Test1 = + let + ss = newStringStream(cast[string](data)) + result = readTest1(ss) + |
