X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink%2B%2B.h;h=2729130cc64872f686a1fe6a4ce9bda60a564c9f;hb=9e8082294a3509b66d98f7340283d0d2bedfa5be;hp=a357cca6516e24d96c0e13e23c7f570b6305b545;hpb=4c0df4e4a9c271268b12d42dea6f81217fe05ce1;p=meshlink diff --git a/src/meshlink++.h b/src/meshlink++.h index a357cca6..2729130c 100644 --- a/src/meshlink++.h +++ b/src/meshlink++.h @@ -182,9 +182,10 @@ namespace meshlink { * @param nodes A pointer to an array of pointers to meshlink::node, which should be allocated by the application. * @param nmemb The maximum number of pointers that can be stored in the nodes array. * - * @return The number of known nodes. This can be larger than nmemb, in which case not all nodes were stored in the nodes array. + * @return The number of known nodes, or -1 in case of an error. + * This can be larger than nmemb, in which case not all nodes were stored in the nodes array. */ - size_t get_all_nodes(node **nodes, size_t nmemb) { + ssize_t get_all_nodes(node **nodes, size_t nmemb) { return meshlink_get_all_nodes(this, (meshlink_node_t **)nodes, nmemb); }