duanshuaimin / protobuf-remote

Automatically exported from code.google.com/p/protobuf-remote
0 stars 0 forks source link

Preprocessor error while creating PRB_SERVICE_STUB with PBR_METHOD(GetValue, PBR_STRING(PBR_VOID)) #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a method like PBR_METHOD(GetValue, PBR_STRING(PBR_VOID))
2. Compile

What is the expected output? What do you see instead?

Below is a piece of macros for the Call method of PBE expanded: 

else if (strcmp(methodName, "GetValue") == 0) { if 
(parameters.GetNumParameters() == 0) { std::string resultValue; GetValue(, 
&resultValue); result->SetString(resultValue); return true; } }

The call to GetValue(std::string* resultPtr) is generated incorrectly. so there 
is an error.

What version of the product are you using? On what operating system?
win7, visual studio 2010, sources from ProtoBufRemote C++ 0.1 downloads zip. 

Please provide any additional information below.
How I get in that issue:
Basically I try to write a c++ server and c# client, it is all fine on с# 
defining service method like string GetValue(), so with c++ I expected the 
similar std::string* GetValue() definition... 
But void GetValue(std::string* param) is just fine.
Now I made workaround by adding add fake int param to the method call.

Thank you,
Vlad

Original issue reported on code.google.com by volodja....@gmail.com on 14 Mar 2011 at 6:03

GoogleCodeExporter commented 9 years ago

Original comment by niallr...@gmail.com on 22 Mar 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Thanks for the report, the fix is in protobuf-remote-cpp-0.1.1.zip

Original comment by niallr...@gmail.com on 22 Mar 2011 at 8:52