diff options
author | Petri Lehtinen <petri@digip.org> | 2011-01-30 12:53:52 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2011-01-30 12:53:54 +0200 |
commit | f25698d08f72c16be9867d137474b6578c864091 (patch) | |
tree | ddccfe874a610d44f45ebc4b01ed510529349fc3 | |
parent | ef13fb91899584f6c80a40fad26405870a2ec780 (diff) | |
download | jansson-f25698d08f72c16be9867d137474b6578c864091.zip jansson-f25698d08f72c16be9867d137474b6578c864091.tar.gz jansson-f25698d08f72c16be9867d137474b6578c864091.tar.bz2 |
Fix an unpack example in the docs
-rw-r--r-- | doc/apiref.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst index fc839ab..adfd4d6 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -1014,9 +1014,9 @@ Examples:: /* returns 0 for validation success, nothing is extracted */ /* root is the JSON array [1, 2, 3, 4, 5] */ - int myint1, myint2, ret; - ret = json_unpack(root, "[ii*]", &myint1, &myint2); - assert(ret == 0 && myint1 == 1 && myint2 == 2); + int myint1, myint2; + json_unpack(root, "[ii!]", &myint1, &myint2); + /* returns -1 for failed validation */ Equality |