Skip to content

Commit

Permalink
Doc examples with zmq_msg_close usage - parameter is 'zmq_msg_t *'
Browse files Browse the repository at this point in the history
Documentation examples for zmq_msg_get and zmq_msg_more functions have an
incorrect call to zmq_msg_close function - with 'zmq_msg_t' as a parameter
despite 'zmq_msg_t *' is required, so it is impossible to compile these
examples properly.

Also for zmq_msg_get example - declaration of zmq_msg_t variable is added
(like it is done in other examples).
  • Loading branch information
mingulov authored and hintjens committed Nov 4, 2013
1 parent aede37e commit 54a3ebc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/zmq_msg_get.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ EXAMPLE
-------
.Receiving a multi-frame message
----
zmq_msg_t frame;
while (true) {
// Create an empty 0MQ message to hold the message frame
int rc = zmq_msg_init (&frame);
Expand All @@ -53,7 +54,7 @@ while (true) {
fprintf (stderr, "end\n");
break;
}
zmq_msg_close (frame);
zmq_msg_close (&frame);
}
----

Expand Down
2 changes: 1 addition & 1 deletion doc/zmq_msg_more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ while (true) {
fprintf (stderr, "end\n");
break;
}
zmq_msg_close (part);
zmq_msg_close (&part);
}
----

Expand Down

0 comments on commit 54a3ebc

Please sign in to comment.