[zeromq-dev] Small patch for zeromq 2.0.7

Martin Sustrik sustrik at 250bpm.com
Tue Aug 24 11:39:41 CEST 2010


Hi Mikael,

> I am using the zeromq library in a Unicode Windows environment and to
> get 2.0.7 to cleanly compile I had to apply the attached patch. I
> have also added what I guess would be needed for Mingw to work with
> the same settings, but I haven't tested it yet (I don't have Mingw
> installed atm).
>
> I and my employer is releasing this patch under the MIT/X11 license.
> Contact me for additional information if needed.

I think there is a problem there. The 'string_buf' is turned to UNICODE, 
right?

Now have a look at zmq::uuid_t::create_blob function:

     const char *buf = (const char*) string_buf;
     blob_buf [0] = convert_byte (buf + 0);
     ...

So the code accesses the unicode buffer as if it were ASCII buffer and 
tries to convert it into a binary representation of the UUID. I would 
expect it to fail during the convert_byte. Does it work OK for you?

Martin





More information about the zeromq-dev mailing list