ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-BER-XS/XS.xs
(Generate patch)

Comparing Convert-BER-XS/XS.xs (file contents):
Revision 1.21 by root, Sat Apr 20 17:23:21 2019 UTC vs.
Revision 1.22 by root, Sat Apr 20 18:38:33 2019 UTC

1081 1081
1082 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) 1082 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
1083 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 1083 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
1084} 1084}
1085 1085
1086SV * 1086void
1087ber_decode (SV *ber, SV *profile = &PL_sv_undef) 1087ber_decode (SV *ber, SV *profile = &PL_sv_undef)
1088 ALIAS:
1089 ber_decode_prefix = 1
1088 CODE: 1090 PPCODE:
1089{ 1091{
1090 cur_profile = SvPROFILE (profile); 1092 cur_profile = SvPROFILE (profile);
1091 STRLEN len; 1093 STRLEN len;
1092 buf = (U8 *)SvPVbyte (ber, len); 1094 buf = (U8 *)SvPVbyte (ber, len);
1093 cur = buf; 1095 cur = buf;
1094 end = buf + len; 1096 end = buf + len;
1095 1097
1096 RETVAL = decode_ber (); 1098 SV *tuple = decode_ber ();
1099
1100 EXTEND (SP, 2);
1101 PUSHs (sv_2mortal (tuple));
1102
1103 if (ix)
1104 PUSHs (sv_2mortal (newSViv (cur - buf)));
1105 else if (cur != end)
1106 error ("trailing garbage after BER data");
1097} 1107}
1098 OUTPUT: RETVAL
1099 1108
1100void 1109void
1101ber_is (SV *tuple, SV *klass = &PL_sv_undef, SV *tag = &PL_sv_undef, SV *flags = &PL_sv_undef, SV *data = &PL_sv_undef) 1110ber_is (SV *tuple, SV *klass = &PL_sv_undef, SV *tag = &PL_sv_undef, SV *flags = &PL_sv_undef, SV *data = &PL_sv_undef)
1102 PPCODE: 1111 PPCODE:
1103{ 1112{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines