forked from phpredis/phpredis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathigbinary.h
More file actions
33 lines (26 loc) · 845 Bytes
/
igbinary.h
File metadata and controls
33 lines (26 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Author: Oleg Grenrus <oleg.grenrus@dynamoid.com>
*
* $Id: igbinary.h,v 1.5 2008/07/03 16:43:46 phadej Exp $
*/
#ifndef IGBINARY_H
#define IGBINARY_H
#include <stdint.h>
#include "php.h"
#define IGBINARY_VERSION "1.0.2"
/** Serialize zval.
* Return buffer is allocated by this function with emalloc.
* @param[out] ret Return buffer
* @param[out] ret_len Size of return buffer
* @param[in] z Variable to be serialized
* @return 0 on success, 1 elsewhere.
*/
int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC);
/** Unserialize to zval.
* @param[in] buf Buffer with serialized data.
* @param[in] buf_len Buffer length.
* @param[out] z Unserialized zval
* @return 0 on success, 1 elsewhere.
*/
int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval **z TSRMLS_DC);
#endif /* IGBINARY_H */