[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-30 Thread protobuf


Comment #10 on issue 296 by jhuxh...@googlemail.com: Deploy protobuf-java  
2.4.1 JAR to Maven Repository

http://code.google.com/p/protobuf/issues/detail?id=296

*End-Of-Month-Bump*

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Issue 308 in protobuf: unresolved external symbol kEmptyString when linking protobuf as a dll.

2011-06-30 Thread protobuf

Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 308 by 0902h...@gmail.com: unresolved external symbol  
kEmptyString when linking protobuf as a dll.

http://code.google.com/p/protobuf/issues/detail?id=308

What steps will reproduce the problem?
1.compile protobuf 2.4.1 as a dll.
2.generate *.pb.h/cc with protoc.exe and add to the vs2008 project.
3.set include path and lib path, compile, link.

What is the expected output? What do you see instead?
expected: no errors.
actual: unresolved external symbol "class std::basic_stringstd::char_traits,class std::allocator > const  
google::protobuf::internal::kEmptyString"


What version of the product are you using? On what operating system?
2.4.1 on Windows 7.

Please provide any additional information below.
::google::protobuf::internal::kEmptyString is used in generated .cc files  
and declared as "extern const ::std::string kEmptyString;" in  
generated_message_util.h, but it is not exported.


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: dynamic deserialize message in Python

2011-06-30 Thread Eric Hopper
On Jun 27, 12:33 pm, Ruslan Mullakhmetov  wrote:
> Hi
>
>    I'm trying to deserialize different protobuf messages in python. Is the
> any way to get message type from unserialized message?
>
>    Like dynamic message in cpp and java ?

Presumably you're using the pattern where you have a containing
message and all of your sub-messages are optional fields of the
containing message, but you only ever expect one of those sub-fields
to be set.

message Hello {
   optional string name = 1;
   optional reply_cookie = 2;
}

message ILoveYou {
   optional float strength = 1;
}

message WontYouTellMeYourName {
   required uint64 reply_cookie = 1;
}

message Doors {
   optional Hello hello = 1;
   optional ILoveYou i_love_you = 2;
   optional WontYouTellMeYourName name_request = 3;
}

In Python, you can do something like:

doors = Doors.FromString(s)
doors.ListFields()[0][0].number

And you will get a number like 1, 2 or 3 depending on which message
you're being sent. You might also get an IndexError exception if
someone sent you a message sub-messages in it at all.

The ListFields function gives you a list of (descriptor,
message_object) tuples. The descriptor describes the message_object in
the terms of the enclosing message, and one of the things a descriptor
records is the field id for the message object.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] New types?

2011-06-30 Thread Eric Hopper
I'm building an application around protocol buffers. The types in my
application can be mapped to types that protocol buffers supports, so
I can sort of on-the-fly translate. For example, I have a timestamp
field that can be translated to a 64 bit unsigned integer. But it
would be really nice to do this within protocol buffers.

Additionally, there are some types that protocol buffers supports
internally, but has no language types for. For example, I would like
the ability to work with integers that were larger than 2^64-1.

Is there a way to use options and hook the compiler to generate your
own types for fields? Is there a way to hook the validation code so
you can make types for integers larger than 2^64-1?

Thanks,
--
Eric Hopper

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] New types?

2011-06-30 Thread Christopher Smith
You could always extend the compiler, but I bet you could get away with a 
simple preprocessor that aliases types and represents those larger integers as 
raw bytes.

--Chris

On Jun 30, 2011, at 7:30 AM, Eric Hopper  wrote:

> I'm building an application around protocol buffers. The types in my
> application can be mapped to types that protocol buffers supports, so
> I can sort of on-the-fly translate. For example, I have a timestamp
> field that can be translated to a 64 bit unsigned integer. But it
> would be really nice to do this within protocol buffers.
> 
> Additionally, there are some types that protocol buffers supports
> internally, but has no language types for. For example, I would like
> the ability to work with integers that were larger than 2^64-1.
> 
> Is there a way to use options and hook the compiler to generate your
> own types for fields? Is there a way to hook the validation code so
> you can make types for integers larger than 2^64-1?
> 
> Thanks,
> --
> Eric Hopper
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 306 in protobuf: Python: Message objects should not be hashable

2011-06-30 Thread protobuf

Updates:
Status: Fixed
Labels: FixedIn-2.4.0

Comment #1 on issue 306 by jas...@google.com: Python: Message objects  
should not be hashable

http://code.google.com/p/protobuf/issues/detail?id=306

This was already fixed in 2.4.0 - are you using an older version of the  
library?


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Issue 309 in protobuf: Support for C-style comments in editors/proto.vim

2011-06-30 Thread protobuf

Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 309 by inf...@gmail.com: Support for C-style comments in  
editors/proto.vim

http://code.google.com/p/protobuf/issues/detail?id=309

proto.vim doesn't currently highlight C-style comments (/* ... */)  
in .proto files.


I propose this patch:

72,73c72
< " TODO: .proto also supports C-style block comments;
< " see /usr/share/vim/vim70/syntax/c.vim for how it's done.
---

syn region  pbComment start="\/\*" end="\*\/" contains=@pbCommentGrp



--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-30 Thread protobuf


Comment #11 on issue 296 by g...@google.com: Deploy protobuf-java 2.4.1 JAR  
to Maven Repository

http://code.google.com/p/protobuf/issues/detail?id=296

And a well-deserved bump.  We had some stuff going on around here that kept  
me busy…  :-)  I'll start the build now.


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 306 in protobuf: Python: Message objects should not be hashable

2011-06-30 Thread protobuf


Comment #2 on issue 306 by matt.gi...@gmail.com: Python: Message objects  
should not be hashable

http://code.google.com/p/protobuf/issues/detail?id=306

Ah, my apologies. I was using 2.3.0. It appears to be fixed for me  
(Messages are now unhashable).


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.