On Fri, 20 Aug 2021 11:55:00 +0100 "Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote: > The behaviour in perl's `eq` operator is exposed to XS authors via > > BOOL sv_eq(SV *left, SV *right); > > Nice and simple. > > As far as I can tell there isn't an equivalent numerical one, for > `==`. I've had to write myself a 47 line wrapper function by copying > out the logic from Perl's (non-API-exposed) Perl_do_ncmp() function. > > I propose adding an API function > > BOOL sv_numeq(SV *left, SV *right); I realised I didn't get around to raising this as a PR. Oops. Here now: https://github.com/Perl/perl5/pull/19368 -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Previous | Thread Next