Changeset ce6721f


Ignore:
Timestamp:
Dec 6, 2008, 2:33:28 AM (16 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
19bab8e
Parents:
3645317
git-author:
Anders Kaseorg <andersk@mit.edu> (12/06/08 00:44:46)
git-committer:
Anders Kaseorg <andersk@mit.edu> (12/06/08 02:33:28)
Message:
Use SvPV_nolen to get rid of n_a dummy variables.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rc4ba74d rce6721f  
    199199
    200200  if (SvTRUE(ERRSV)) {
    201     STRLEN n_a;
    202     owl_function_error("Perl Error: '%s'", SvPV(ERRSV, n_a));
     201    owl_function_error("Perl Error: '%s'", SvPV_nolen(ERRSV));
    203202    /* and clear the error */
    204203    sv_setsv (ERRSV, &PL_sv_undef);
     
    261260
    262261  if (SvTRUE(ERRSV)) {
    263     STRLEN n_a;
    264     owl_function_error("Error: '%s'", SvPV(ERRSV, n_a));
     262    owl_function_error("Error: '%s'", SvPV_nolen(ERRSV));
    265263    /* and clear the error */
    266264    sv_setsv (ERRSV, &PL_sv_undef);
     
    303301  ret=perl_parse(p, owl_perl_xs_init, 2, args, NULL);
    304302  if (ret || SvTRUE(ERRSV)) {
    305     STRLEN n_a;
    306     err=owl_strdup(SvPV(ERRSV, n_a));
     303    err=owl_strdup(SvPV_nolen(ERRSV));
    307304    sv_setsv(ERRSV, &PL_sv_undef);     /* and clear the error */
    308305    return(err);
     
    311308  ret=perl_run(p);
    312309  if (ret || SvTRUE(ERRSV)) {
    313     STRLEN n_a;
    314     err=owl_strdup(SvPV(ERRSV, n_a));
     310    err=owl_strdup(SvPV_nolen(ERRSV));
    315311    sv_setsv(ERRSV, &PL_sv_undef);     /* and clear the error */
    316312    return(err);
     
    341337
    342338  if (SvTRUE(ERRSV)) {
    343     STRLEN n_a;
    344     err=owl_strdup(SvPV(ERRSV, n_a));
     339    err=owl_strdup(SvPV_nolen(ERRSV));
    345340    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
    346341    return(err);
     
    395390
    396391  if (SvTRUE(ERRSV)) {
    397     STRLEN n_a;
    398     owl_function_error("Perl Error: '%s'", SvPV(ERRSV, n_a));
     392    owl_function_error("Perl Error: '%s'", SvPV_nolen(ERRSV));
    399393    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
    400394  }
     
    438432  char * ret = NULL;
    439433  SV *rv;
    440   STRLEN n_a;
    441434  dSP;
    442435
     
    457450
    458451  if(SvTRUE(ERRSV)) {
    459     owl_function_error("%s", SvPV(ERRSV, n_a));
     452    owl_function_error("%s", SvPV_nolen(ERRSV));
    460453    (void)POPs;
    461454  } else {
     
    464457    rv = POPs;
    465458    if(SvTRUE(rv)) {
    466       ret = owl_strdup(SvPV(rv, n_a));
     459      ret = owl_strdup(SvPV_nolen(rv));
    467460    }
    468461  }
     
    488481  SV *cb = (SV*)(e->cbdata);
    489482  SV *text;
    490   unsigned int n_a;
    491483  dSP;
    492484
     
    507499
    508500  if(SvTRUE(ERRSV)) {
    509     owl_function_error("%s", SvPV(ERRSV, n_a));
     501    owl_function_error("%s", SvPV_nolen(ERRSV));
    510502  }
    511503
     
    525517  call_pv("BarnOwl::Hooks::_mainloop_hook", G_DISCARD|G_EVAL);
    526518  if(SvTRUE(ERRSV)) {
    527     STRLEN n_a;
    528     owl_function_error("%s", SvPV(ERRSV, n_a));
     519    owl_function_error("%s", SvPV_nolen(ERRSV));
    529520  }
    530521  return;
     
    534525{
    535526  SV *cb = d->pfunc;
    536   unsigned int n_a;
    537527  dSP;
    538528  if(cb == NULL) {
     
    549539
    550540  if(SvTRUE(ERRSV)) {
    551     owl_function_error("%s", SvPV(ERRSV, n_a));
     541    owl_function_error("%s", SvPV_nolen(ERRSV));
    552542  }
    553543
Note: See TracChangeset for help on using the changeset viewer.