php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
serialize.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
7#ifndef LEXBOR_SERIALIZE_H
8#define LEXBOR_SERIALIZE_H
9
10
11#include "lexbor/core/base.h"
12
13
14#define lexbor_serialize_write(cb, data, length, ctx, status) \
15 do { \
16 (status) = (cb)((lxb_char_t *) (data), (length), (ctx)); \
17 if ((status) != LXB_STATUS_OK) { \
18 return (status); \
19 } \
20 } \
21 while (false)
22
23
25lexbor_serialize_length_cb(const lxb_char_t *data, size_t length, void *ctx);
26
27
29lexbor_serialize_copy_cb(const lxb_char_t *data, size_t length, void *ctx);
30
31
32#endif /* LEXBOR_SERIALIZE_H */
LXB_API lxb_status_t lexbor_serialize_length_cb(const lxb_char_t *data, size_t length, void *ctx)
Definition serialize.c:12
LXB_API lxb_status_t lexbor_serialize_copy_cb(const lxb_char_t *data, size_t length, void *ctx)
Definition serialize.c:19
#define LXB_API
Definition def.h:48
zend_constant * data
unsigned int lxb_status_t
Definition types.h:28
unsigned char lxb_char_t
Definition types.h:27