diff --git a/kcgijson.h b/kcgijson.h index cb9a560..1f3501b 100644 --- a/kcgijson.h +++ b/kcgijson.h @@ -39,6 +39,10 @@ enum kjsontype { KJSON_STRING }; +/* + * The maximum number of JSON scopes allowed. + * Once this has been reached, new scopes will return KCGI_ENOMEM. + */ #define KJSON_STACK_MAX 128 struct kjsonscope { diff --git a/man/kjson_array_open.3 b/man/kjson_array_open.3 index 2a90d3b..56680dd 100644 --- a/man/kjson_array_open.3 +++ b/man/kjson_array_open.3 @@ -72,7 +72,8 @@ indicating the error state. .It Dv KCGI_OK Success (not an error). .It Dv KCGI_ENOMEM -Internal memory allocation failure. +Internal memory allocation failure, including reaching the maximum +number of possible JSON scopes. .It Dv KCGI_HUP The output connection has been terminated. For FastCGI connections, the current connection should be released with diff --git a/man/kjson_obj_open.3 b/man/kjson_obj_open.3 index 631b6a6..b20f06f 100644 --- a/man/kjson_obj_open.3 +++ b/man/kjson_obj_open.3 @@ -72,7 +72,8 @@ indicating the error state. .It Dv KCGI_OK Success (not an error). .It Dv KCGI_ENOMEM -Internal memory allocation failure. +Internal memory allocation failure, including reaching the maximum +number of possible JSON scopes. .It Dv KCGI_HUP The output connection has been terminated. For FastCGI connections, the current connection should be released with diff --git a/man/kjson_string_open.3 b/man/kjson_string_open.3 index e419383..7b8ebc1 100644 --- a/man/kjson_string_open.3 +++ b/man/kjson_string_open.3 @@ -73,7 +73,8 @@ indicating the error state. .It Dv KCGI_OK Success (not an error). .It Dv KCGI_ENOMEM -Internal memory allocation failure. +Internal memory allocation failure, including reaching the maximum +number of possible JSON scopes. .It Dv KCGI_HUP The output connection has been terminated. For FastCGI connections, the current connection should be released with