[protobuf] Issue 551 in protobuf: changing type of comments to bytes
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 551 by again1...@gmail.com: changing type of comments to bytes http://code.google.com/p/protobuf/issues/detail?id=551 What steps will reproduce the problem? In descriptor.proto the message Location are defined as following: message Location { repeated int32 path = 1 [packed=true]; repeated int32 span = 2 [packed=true]; optional string leading_comments = 3; optional string trailing_comments = 4; } Both the type of leading_comments and trailing_comments are string. I think it's better to change the type string into bytes because not all protobuf comments are written in utf8 or ascii. As in my case, I use c++ to serialize a gbk encoded protobuf file into FileDescriptorProto and deserialize it using python. I successfully serialized the gbk encoded comments into FileDescriptorProto using c++(protobuf has no python compiler) but failed to deserialize it using python because the comments are encoded in gbk. I think it's unreasonable to care about the encoding of comments of protobuf files. So maybe it's better to use bytes here. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? protobuf-2.5.0 Please provide any additional information below. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 552 in protobuf: PC-Lint accusing errors in atomicops.h and type_traits.h
Comment #2 on issue 552 by felipe.f...@gmail.com: PC-Lint accusing errors in atomicops.h and type_traits.h http://code.google.com/p/protobuf/issues/detail?id=552 #define wchar_t __wchar_t is a case that even MS doesn't support, if the user does that MS headers will be inconsistent. They will only work if the user creates an additional define of _NATIVE_WCHAR_T_DEFINED. Supporting this cenario is using the compiler in a way that even MS doesn't use/support. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 552 in protobuf: PC-Lint accusing errors in atomicops.h and type_traits.h
Comment #3 on issue 552 by xiaof...@google.com: PC-Lint accusing errors in atomicops.h and type_traits.h http://code.google.com/p/protobuf/issues/detail?id=552 I agree with you that maybe __wchar_t is only used by very few people and we don't have to support it. But as you said it's not wrong for the type_traits library to have it. The issue should rather be fixed in PC-Lint to make it support __wchar_t too. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] protobuf_spec: RSpec matchers and Cucumber step defs for testing Protocol Buffers
Hi there! We've just released an open source library for inspecting and building protocol buffers to be used in Cucumber scenarios. Check it out here: https://github.com/connamara/protobuf_spec We think this would be a great addition to the Third-Party Add-Ons wiki (https://code.google.com/p/protobuf/wiki/ThirdPartyAddOns). Our company, Connamara Systems, is positioned in the Financial Technology space to deliver made-to-measure software using agile and test driven development methodologies. A lot of that software depends on protocol buffers, and we make heavy use of Cucumber for our acceptance testing. protobuf_spec leverages ruby-protobuf (https://github.com/macks/ruby-protobuf) the very nifty json_spec (https://github.com/collectiveidea/json_spec) library for exploring protocol buffers with an easy to use path syntax. The library has been hardened by many development cycles that are now in production. If you use BDD and protocol buffers, protobuf_spec could be for you. Contributions are encouraged! Chris Busbey Connamara Systems, llc www.connamara.com -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Problem with protobuf class
When i try this: #define PROTOBUF_USE_DLLS #include iostream #include fstream #include string #include profiles.pb.h using namespace std; using namespace profiles; int main() { profiles::Profile aaa; //fstream in(a1.inp, ios::in | ios::binary); //aaa-ParseFromIstream(in); return 0; } I have linker errors: main.obj : error LNK2028: unresolved token (0A000340) public: __thiscall profiles::Profile::Profile(void) (??0Profile@profiles@@$$FQAE@XZ) referenced in function int __cdecl main(void) (?main@@$$HYAHXZ) 1main.obj : error LNK2028: unresolved token (0A000341) public: virtual __thiscall profiles::Profile::~Profile(void) (??1Profile@profiles@@$$FUAE@XZ) referenced in function int __cdecl main(void) (?main@@$$HYAHXZ) 1main.obj : error LNK2019: unresolved external symbol public: virtual __thiscall profiles::Profile::~Profile(void) (??1Profile@profiles@@$$FUAE@XZ) referenced in function int __cdecl main(void) (?main@@$$HYAHXZ) 1main.obj : error LNK2019: unresolved external symbol public: __thiscall profiles::Profile::Profile(void) (??0Profile@profiles@@$$FQAE@XZ) referenced in function int __cdecl main(void) (?main@@$$HYAHXZ) 1c:\users\nowami0tk2\documents\visual studio 2010\Projects\test3\Release\test3.exe : fatal error LNK1120: 4 unresolved externals Same using pointer: #define PROTOBUF_USE_DLLS #include iostream #include fstream #include string #include profiles.pb.h using namespace std; using namespace profiles; int main() { profiles::Profile* aaa; fstream in(a1.inp, ios::in | ios::binary); aaa-ParseFromIstream(in); return 0; } It compiles, but result with System,AccessViolationException, so how to read this file ? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Debug assertion failed while attempting to set an object
https://lh4.googleusercontent.com/-Am9nM_zm1i0/Uh4zrDQJPlI/AAk/utPcxdnVUIg/s1600/buf.png I currently have something like this. I get an error when i attempt to store data in a message that has multiple message types in it. message MyTypeA { optional string Account = 1 ; optional string Name = 2 ; } message MyTypeB { optional int32 position = 1; } message MyCollection { optional MyTypeA= 1; optional MyTypeB pos = 2; } Now I am using it as void SomeMethod(MyTypeA mta) { MyCollection col; * col.set_allocated_MyTypeA(mta); //This point eventually fires of a debug assertion* } The error I get is Debug assertion failed. Expression : _BLOCK_TYPE_IS_VALID(pHead-nBlockUse); Any suggestion on where I might be going wrong -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Error while attempting to assign a message type as filed in a message type.
I have something like this in my proto file message MyTypeA { optional string Account = 1 ; optional string Name = 2 ; } message MyTypeB { optional int32 position = 1; } message MyCollection { optional MyTypeA= 1; optional MyTypeB pos = 2; } Now I am using it as *void SomeMethod(MyTypeA mta) { MyCollection col; col.set_allocated_MyTypeA(mta); //This point eventually fires of a debug assertion }* Eventually after a while I get an error and the stack trace leads to void MyCollection::SharedCtor() { _cached_size_ = 0; MyTypeA_ = NULL; MyTypeB_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } and also in the set_allocated_custord method of the generated code any suggestions on how I could resolve htis issue -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.