Changeset d4927a7 for perlconfig.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:46 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
3472845
Parents:
ddbbcffa
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:55:10)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:46)
Message:
Replace owl_strdup with g_strdup.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rddbbcffa rd4927a7  
    148148  type = owl_message_get_type(m);
    149149  if(!type || !*type) type = "generic";
    150   utype = owl_strdup(type);
     150  utype = g_strdup(type);
    151151  utype[0] = toupper(type[0]);
    152152  blessas = owl_sprintf("BarnOwl::Message::%s", utype);
     
    214214      owl_message_set_zwriteline(m, val);
    215215    } else if (!strcmp(key, "time")) {
    216       m->timestr = owl_strdup(val);
     216      m->timestr = g_strdup(val);
    217217      strptime(val, "%a %b %d %T %Y", &tm);
    218218      m->time = mktime(&tm);
     
    282282
    283283  if (srv) {
    284     out = owl_strdup(SvPV_nolen(srv));
     284    out = g_strdup(SvPV_nolen(srv));
    285285  } else {
    286286    out = NULL;
     
    335335
    336336  if (srv) {
    337     out = owl_strdup(SvPV_nolen(srv));
     337    out = g_strdup(SvPV_nolen(srv));
    338338  } else {
    339339    out = NULL;
     
    369369  ret=perl_parse(p, owl_perl_xs_init, 2, (char **)args, NULL);
    370370  if (ret || SvTRUE(ERRSV)) {
    371     err=owl_strdup(SvPV_nolen(ERRSV));
     371    err=g_strdup(SvPV_nolen(ERRSV));
    372372    sv_setsv(ERRSV, &PL_sv_undef);     /* and clear the error */
    373373    return(err);
     
    376376  ret=perl_run(p);
    377377  if (ret || SvTRUE(ERRSV)) {
    378     err=owl_strdup(SvPV_nolen(ERRSV));
     378    err=g_strdup(SvPV_nolen(ERRSV));
    379379    sv_setsv(ERRSV, &PL_sv_undef);     /* and clear the error */
    380380    return(err);
     
    412412
    413413  if (SvTRUE(ERRSV)) {
    414     err=owl_strdup(SvPV_nolen(ERRSV));
     414    err=g_strdup(SvPV_nolen(ERRSV));
    415415    sv_setsv (ERRSV, &PL_sv_undef);     /* and clear the error */
    416416    return(err);
     
    450450  }
    451451
    452   out = owl_strdup(SvPV(response, len));
     452  out = g_strdup(SvPV(response, len));
    453453  FREETMPS;
    454454  LEAVE;
     
    529529    rv = POPs;
    530530    if(SvTRUE(rv)) {
    531       ret = owl_strdup(SvPV_nolen(rv));
     531      ret = g_strdup(SvPV_nolen(rv));
    532532    }
    533533  }
Note: See TracChangeset for help on using the changeset viewer.