mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Remove a duplicated depth check
This commit is contained in:
parent
60b36ffaa3
commit
4adcdb5ba8
@ -149,7 +149,7 @@ static void _msgpack_pack_rv(enc_t *enc, SV* sv, int depth);
|
|||||||
STATIC_INLINE void _msgpack_pack_sv(enc_t* const enc, SV* const sv, int const depth) {
|
STATIC_INLINE void _msgpack_pack_sv(enc_t* const enc, SV* const sv, int const depth) {
|
||||||
dTHX;
|
dTHX;
|
||||||
assert(sv);
|
assert(sv);
|
||||||
if (depth <= 0) Perl_croak(aTHX_ ERR_NESTING_EXCEEDED);
|
if (UNLIKELY(depth <= 0)) Perl_croak(aTHX_ ERR_NESTING_EXCEEDED);
|
||||||
SvGETMAGIC(sv);
|
SvGETMAGIC(sv);
|
||||||
|
|
||||||
if (SvPOKp(sv)) {
|
if (SvPOKp(sv)) {
|
||||||
@ -188,7 +188,6 @@ STATIC_INLINE void _msgpack_pack_sv(enc_t* const enc, SV* const sv, int const de
|
|||||||
STATIC_INLINE void _msgpack_pack_rv(enc_t *enc, SV* sv, int depth) {
|
STATIC_INLINE void _msgpack_pack_rv(enc_t *enc, SV* sv, int depth) {
|
||||||
svtype svt;
|
svtype svt;
|
||||||
dTHX;
|
dTHX;
|
||||||
if (depth <= 0) Perl_croak(aTHX_ ERR_NESTING_EXCEEDED);
|
|
||||||
SvGETMAGIC(sv);
|
SvGETMAGIC(sv);
|
||||||
svt = SvTYPE(sv);
|
svt = SvTYPE(sv);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user