Skip to content

int64 and uint64 decode is not supported in 32-bit php? #33

@zhanglisheng

Description

@zhanglisheng

hi.
I get a problem, in 32-bit php decode int64 is error. I think the problem maybe is here.

 int msgpack_unserialize_int64( msgpack_unserialize_data *unpack, int64_t data, zval **obj) { ZVAL_LONG(*obj, data); return 0; }  

int msgpack_unserialize_int64(
msgpack_unserialize_data _unpack, int64_t data, zval *_obj)
{
if(data > LONG_MAX || data < -LONG_MAX) {
ZVAL_DOUBLE(_obj, (double)data);
} else {
ZVAL_LONG(_obj, data);
}
return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions