예제 #1
0
int msgpack_unserialize_array(
    msgpack_unserialize_data *unpack, unsigned int count, zval **obj)
{
    MSGPACK_UNSERIALIZE_ALLOC_VALUE(unpack);

    array_init(*obj);

    if (count) unpack->stack[unpack->deps++] = count;

    return 0;
}
예제 #2
0
int msgpack_unserialize_map(
    msgpack_unserialize_data *unpack, unsigned int count, zval **obj)
{
    MSGPACK_UNSERIALIZE_ALLOC_VALUE(unpack);

    if (count) unpack->stack[unpack->deps++] = count;

    unpack->type = MSGPACK_SERIALIZE_TYPE_NONE;

    return 0;
}
예제 #3
0
int msgpack_unserialize_map(
    msgpack_unserialize_data *unpack, unsigned int count, zval **obj)
{
    TSRMLS_FETCH();
    MSGPACK_UNSERIALIZE_ALLOC_VALUE(unpack);

    if (count) unpack->stack[unpack->deps++] = count;

    unpack->type = MSGPACK_SERIALIZE_TYPE_NONE;

    if (count == 0)
    {
        if (MSGPACK_G(php_only))
        {
            object_init(*obj);
        }
        else
        {
            array_init(*obj);
        }
    }

    return 0;
}