Commit a69942cc authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Style

parent 4d3f9aa1
......@@ -135,13 +135,14 @@ void redis_parser_init(redis_parser_t *parser, const redis_parser_callbacks_t *c
}
/* Execute the parser against len bytes in buf. When a full message was read,
* the "dst" pointer is populated with the address of the root object (this
* address is a static offset in the redis_parser_t struct, but may change in
* the future). This pointer is set to NULL when no full message could be
* parsed. This function returns the number of bytes that could be parsed. When
* no full message was parsed and the return value is smaller than the number
* of bytes that were available, an error occured and the parser should be
* re-initialized before parsing more data. */
* the "dst" pointer is populated with the address of the root payload object.
* This pointer is set to NULL when no full message could be parsed.
*
* This function returns the number of bytes that could be parsed. When no full
* message was parsed and the return value is smaller than the number of bytes
* that were available, an error occured and the parser should be
* re-initialized before parsing more data.
*/
size_t redis_parser_execute(redis_parser_t *parser, redis_protocol_t **dst, const char *buf, size_t len) {
redis_protocol_t *stack = parser->stack;
const redis_parser_callbacks_t *callbacks = parser->callbacks;
......
......@@ -52,10 +52,10 @@ typedef enum redis_parser_err_e {
struct redis_protocol_s {
unsigned char type; /* payload type */
void *data; /* payload data (to be populated by the callback functions) */
const redis_protocol_t* parent; /* when nested, parent object */
int remaining; /* remaining bulk bytes/nested objects */
int cursor; /* number of processed bulk bytes/nested objects */
void *data; /* user data */
size_t poff; /* protocol offset */
size_t plen; /* protocol length */
size_t coff; /* content offset */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment