mirror of
https://github.com/json-c/json-c.git
synced 2026-04-04 04:49:06 +08:00
Issue #418: Fix docs for json_util_from_fd and json_util_from_file to say that they return NULL on failures.
This commit is contained in:
@@ -38,7 +38,7 @@ extern "C" {
|
|||||||
* Read the full contents of the given file, then convert it to a
|
* Read the full contents of the given file, then convert it to a
|
||||||
* json_object using json_tokener_parse().
|
* json_object using json_tokener_parse().
|
||||||
*
|
*
|
||||||
* Returns -1 if something fails. See json_util_get_last_err() for details.
|
* Returns NULL on failure. See json_util_get_last_err() for details.
|
||||||
*/
|
*/
|
||||||
extern struct json_object* json_object_from_file(const char *filename);
|
extern struct json_object* json_object_from_file(const char *filename);
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ extern struct json_object* json_object_from_file(const char *filename);
|
|||||||
* Note, that the fd must be readable at the actual position, i.e.
|
* Note, that the fd must be readable at the actual position, i.e.
|
||||||
* use lseek(fd, 0, SEEK_SET) before.
|
* use lseek(fd, 0, SEEK_SET) before.
|
||||||
*
|
*
|
||||||
* Returns -1 if something fails. See json_util_get_last_err() for details.
|
* Returns NULL on failure. See json_util_get_last_err() for details.
|
||||||
*/
|
*/
|
||||||
extern struct json_object* json_object_from_fd(int fd);
|
extern struct json_object* json_object_from_fd(int fd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user