From: Lukas Mai Date: Fri, 22 Jun 2012 12:38:12 +0000 (+0200) Subject: wibble 'sv_eq_pvn' X-Git-Tag: v0.06_01~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FFunction-Parameters.git;a=commitdiff_plain;h=59016bfbf00d500121a167cd7fdac1d15aae541d wibble 'sv_eq_pvn' --- diff --git a/Parameters.xs b/Parameters.xs index 7129ddf..904ea25 100644 --- a/Parameters.xs +++ b/Parameters.xs @@ -150,15 +150,12 @@ static void free_ptr_op(pTHX_ void *vp) { Safefree(pp); } -#define sv_eq_pvs(SV, S) sv_eq_pvn(aTHX_ SV, "" S "", sizeof (S) - 1) +#define sv_eq_pvs(SV, S) my_sv_eq_pvn(aTHX_ SV, "" S "", sizeof (S) - 1) -static int sv_eq_pvn(pTHX_ SV *sv, const char *p, STRLEN n) { +static int my_sv_eq_pvn(pTHX_ SV *sv, const char *p, STRLEN n) { STRLEN sv_len; const char *sv_p = SvPV(sv, sv_len); - return - sv_len == n && - memcmp(sv_p, p, n) == 0 - ; + return memcmp(sv_p, p, n) == 0; }