File: msgpack_pack.h

package info (click to toggle)
php-msgpack 1%3A3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,224 kB
  • sloc: ansic: 3,925; xml: 458; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 762 bytes parent folder | download
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

#ifndef MSGPACK_PACK_H
#define MSGPACK_PACK_H

#include "ext/standard/php_var.h"

typedef HashTable* msgpack_serialize_data_t;

typedef struct msgpack_timestamp {
    int64_t tv_sec;
    uint32_t tv_nsec;
} msgpack_timestamp;

enum msgpack_serialize_type
{
    MSGPACK_SERIALIZE_TYPE_NONE =  0,
    MSGPACK_SERIALIZE_TYPE_REFERENCE =  1,
    MSGPACK_SERIALIZE_TYPE_RECURSIVE,
    MSGPACK_SERIALIZE_TYPE_CUSTOM_OBJECT,
    MSGPACK_SERIALIZE_TYPE_OBJECT,
    MSGPACK_SERIALIZE_TYPE_OBJECT_REFERENCE,
    MSGPACK_SERIALIZE_TYPE_ENUM,
};

void msgpack_serialize_var_init(msgpack_serialize_data_t *var_hash);
void msgpack_serialize_var_destroy(msgpack_serialize_data_t *var_hash);
void msgpack_serialize_zval(smart_str *buf, zval *val, HashTable *var_hash);

#endif