mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
Taking NULL is a bug
This commit is contained in:
parent
197205853f
commit
0768cf17b6
1 changed files with 3 additions and 4 deletions
|
|
@ -143,14 +143,13 @@ STATIC_INLINE int try_int(enc_t* enc, const char *p, size_t len) {
|
|||
|
||||
static void _msgpack_pack_rv(enc_t *enc, SV* sv, int depth);
|
||||
|
||||
STATIC_INLINE void _msgpack_pack_sv(enc_t *enc, SV* sv, int depth) {
|
||||
STATIC_INLINE void _msgpack_pack_sv(enc_t* const enc, SV* const sv, int const depth) {
|
||||
dTHX;
|
||||
assert(sv);
|
||||
if (depth <= 0) Perl_croak(aTHX_ ERR_NESTING_EXCEEDED);
|
||||
SvGETMAGIC(sv);
|
||||
|
||||
if (sv==NULL) {
|
||||
msgpack_pack_nil(enc);
|
||||
} else if (SvPOKp(sv)) {
|
||||
if (SvPOKp(sv)) {
|
||||
STRLEN len;
|
||||
char * csv = SvPV(sv, len);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue