[zeromq-dev] Proposed minor changes to spec:21

Osiris Pedroso opedroso at gmail.com
Fri Sep 4 12:51:43 CEST 2015


I happened across 0MQ and I am really excited to use it in a project at
work.

I am still reading The Guide and the web site in general.

I came across some inconsistencies/typos in this (stable) RFC and would
like to point them out.

These are comments related to http://rfc.zeromq.org/spec:21

============================
Under Code Style, Declarations, the example shows this:

myp_mymod_t *mymod = myp_mymod_new ();
char *comma = strchr (surname, '.');

I believe in the second line, the '.' should be changed to have a ',' OR
the variable name changed to "char *period" per your code guidelines
(Variable names like i and temp that carry no information SHALL NOT be
used.)
In this case, the variable name carries information, but the information it
carries is incorrect.
There are several other examples below that shows the same code excerpt
using ',', so I believe changing the '.' to a ',' is the correct change.

============================
Under Portability, Portable Versus Native Classes

The example seems incorrect, having the APIs to get process id for UNIX and
Windows reversed.
I believe the correct version should be like this:

#if (defined (__UNIX__))
    pid = getpid ();
#elif (defined (__WINDOWS__))
    pid = GetCurrentProcessId ();
#else
    pid = 0;
#endif

============================

Thanks,
Osiris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150904/35ecf581/attachment.htm>


More information about the zeromq-dev mailing list