mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 14:45:38 +02:00
perl: added argument check
This commit is contained in:
@@ -136,7 +136,9 @@ static void _msgpack_pack_sv(enc_t *enc, SV* val) {
|
||||
|
||||
XS(xs_pack) {
|
||||
dXSARGS;
|
||||
PERL_UNUSED_VAR(items); /* TODO: check argument count */
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: Data::MessagePack->pack($dat)");
|
||||
}
|
||||
|
||||
SV* val = ST(1);
|
||||
|
||||
|
Reference in New Issue
Block a user