Xfree or ruby_xfree


#1

e$B@>;3OB9-$G$9!#e(B

trunke$B$He(Bruby_1_8e$B$Ne(Bext/gdbm/gdbm.ce$B$Ne(Bdiffe$B$r$_$?$H$-$Ke(Bfreee$B$He(Bxfreee$B$Ne(B
e$B0c$$$,5$$K$J$C$?$N$G!"e(B
http://redmine.ruby-lang.org/repositories/diff/ruby-19?rev=17017
e$B$N0lIt$r%P%C%/%]!<%H$7$h$&$+$H;W$C$?$N$G$9$,!"e(B
xfreee$B$He(Bruby_xfreee$B$O$I$&$$$&4p=`$G;H$$J,$1$F$$$k$N$G$7$g$&$+e(B?

e$B0J2<!"8=>u$N%Q%C%A$G$9!#e(B

trunke$B$NJ}e(B:
Index: ext/curses/curses.c

— ext/curses/curses.c (revision 20364)
+++ ext/curses/curses.c (working copy)
@@ -94,7 +94,7 @@
{
if (winp->window && winp->window != stdscr) delwin(winp->window);
winp->window = 0;

  • free(winp);
  • xfree(winp);
    }

static VALUE

ruby_1_8e$B$NJ}e(B:
Index: ext/digest/digest.c

— ext/digest/digest.c (revision 20360)
+++ ext/digest/digest.c (working copy)
@@ -469,7 +469,7 @@
pctx = xmalloc(algo->ctx_size);
algo->init_func(pctx);

  • obj = Data_Wrap_Struct(klass, 0, free, pctx);
  • obj = Data_Wrap_Struct(klass, 0, xfree, pctx);

    return obj;
    }
    Index: ext/sdbm/init.c
    ===================================================================
    — ext/sdbm/init.c (revision 20360)
    +++ ext/sdbm/init.c (working copy)
    @@ -46,7 +46,7 @@
    {

    if (dbmp->di_dbm) sdbm_close(dbmp->di_dbm);

  • free(dbmp);
  • xfree(dbmp);
    }

static VALUE
Index: ext/zlib/zlib.c

— ext/zlib/zlib.c (revision 20360)
+++ ext/zlib/zlib.c (working copy)
@@ -410,7 +410,7 @@
zlib_mem_free(opaque, address)
voidpf opaque, address;
{

  • free(address);
  • xfree(address);
    }

static void
@@ -837,7 +837,7 @@
if (ZSTREAM_IS_READY(z)) {
zstream_finalize(z);
}

  • free(z);
  • xfree(z);
    }

static VALUE
@@ -1776,7 +1776,7 @@
}
zstream_finalize(z);
}

  • free(gz);
  • xfree(gz);
    }

static VALUE
Index: ext/curses/curses.c

— ext/curses/curses.c (revision 20360)
+++ ext/curses/curses.c (working copy)
@@ -95,7 +95,7 @@
{
if (winp->window && winp->window != stdscr) delwin(winp->window);
winp->window = 0;

  • free(winp);
  • xfree(winp);
    }

static VALUE
@@ -672,7 +672,7 @@
curses_mousedata_free(struct mousedata *mdata)
{
if (mdata->mevent)

  • free(mdata->mevent);
  • xfree(mdata->mevent);
    }

static VALUE
Index: ext/openssl/ossl_hmac.c

— ext/openssl/ossl_hmac.c (revision 20360)
+++ ext/openssl/ossl_hmac.c (working copy)
@@ -42,7 +42,7 @@
ossl_hmac_free(HMAC_CTX *ctx)
{
HMAC_CTX_cleanup(ctx);

  • free(ctx);
  • xfree(ctx);
    }

static VALUE
Index: ext/openssl/ossl_cipher.c

— ext/openssl/ossl_cipher.c (revision 20360)
+++ ext/openssl/ossl_cipher.c (working copy)
@@ -67,7 +67,7 @@
{
if (ctx) {
EVP_CIPHER_CTX_cleanup(ctx);

  • free(ctx);
  • xfree(ctx);
    }
    }

Index: ext/openssl/ossl_pkey_ec.c

— ext/openssl/ossl_pkey_ec.c (revision 20360)
+++ ext/openssl/ossl_pkey_ec.c (working copy)
@@ -695,7 +695,7 @@
{
if (!ec_group->dont_free && ec_group->group)
EC_GROUP_clear_free(ec_group->group);

  • free(ec_group);
  • xfree(ec_group);
    }

static VALUE ossl_ec_group_alloc(VALUE klass)
@@ -1201,7 +1201,7 @@
{
if (!ec_point->dont_free && ec_point->point)
EC_POINT_clear_free(ec_point->point);

  • free(ec_point);
  • xfree(ec_point);
    }

static VALUE ossl_ec_point_alloc(VALUE klass)
Index: ext/dbm/dbm.c

— ext/dbm/dbm.c (revision 20360)
+++ ext/dbm/dbm.c (working copy)
@@ -54,7 +54,7 @@
{
if (dbmp) {
if (dbmp->di_dbm) dbm_close(dbmp->di_dbm);

  • free(dbmp);
  • xfree(dbmp);
    }
    }

Index: ext/gdbm/gdbm.c

— ext/gdbm/gdbm.c (revision 20361)
+++ ext/gdbm/gdbm.c (working copy)
@@ -113,7 +113,7 @@
{
if (dbmp) {
if (dbmp->di_dbm) gdbm_close(dbmp->di_dbm);

  •    free(dbmp);
    
  •    xfree(dbmp);
    
    }
    }

Index: ext/strscan/strscan.c

— ext/strscan/strscan.c (revision 20360)
+++ ext/strscan/strscan.c (working copy)
@@ -157,7 +157,7 @@
strscan_free(struct strscanner *p)
{
re_free_registers(&(p->regs));

  • free§;
  • xfree§;
    }

static VALUE


#2

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:37200] xfree or ruby_xfree”
on Wed, 26 Nov 2008 15:41:47 +0900, Kazuhiro NISHIYAMA
removed_email_address@domain.invalid writes:

|trunke$B$He(Bruby_1_8e$B$Ne(Bext/gdbm/gdbm.ce$B$Ne(Bdiffe$B$r$_$?$H$-$Ke(Bfreee$B$He(Bxfreee$B$Ne(B
|e$B0c$$$,5$$K$J$C$?$N$G!"e(B
|http://redmine.ruby-lang.org/repositories/diff/ruby-19?rev=17017
|e$B$N0lIt$r%P%C%/%]!<%H$7$h$&$+$H;W$C$?$N$G$9$,!"e(B
|xfreee$B$He(Bruby_xfreee$B$O$I$&$$$&4p=`$G;H$$J,$1$F$$$k$N$G$7$g$&$+e(B?

e$B8=;~E@$G$O7k6I$I$l$be(Bfreee$B$r8F$s$G$$$k$N$GF1$8$J$N$G$9$,!"$5$5e(B
e$B$@$5$s$O!Ve(Bmalloce$B$7$?4X?t$HBP1~$9$k$b$N$r;H$&!W$H$$$&J}?K$rDse(B
e$B0F$7$F$*$i$l$^$9!#$D$^$j!"e(B

malloce$B$He(Bfree
xmalloce$B$He(Bxfree
ruby_xmalloce$B$He(Bruby_xfree

e$B$NAH$_9g$o$;$G$9!#e(B