[macruby-changes] [2870] MacRuby/trunk/onig/enc/unicode.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 20 17:17:33 PDT 2009


Revision: 2870
          http://trac.macosforge.org/projects/ruby/changeset/2870
Author:   lsansonetti at apple.com
Date:     2009-10-20 17:17:32 -0700 (Tue, 20 Oct 2009)
Log Message:
-----------
do not leak some internal hash tables

Modified Paths:
--------------
    MacRuby/trunk/onig/enc/unicode.c

Modified: MacRuby/trunk/onig/enc/unicode.c
===================================================================
--- MacRuby/trunk/onig/enc/unicode.c	2009-10-20 23:33:59 UTC (rev 2869)
+++ MacRuby/trunk/onig/enc/unicode.c	2009-10-21 00:17:32 UTC (rev 2870)
@@ -10901,7 +10901,7 @@
 
   THREAD_ATOMIC_START;
 
-  FoldTable = st_init_numtable_with_size(1200);
+  FoldTable = onig_st_init_numtable_with_size(1200);
   if (ONIG_IS_NULL(FoldTable)) return ONIGERR_MEMORY;
   for (i = 0; i < (int )(sizeof(CaseFold)/sizeof(CaseFold_11_Type)); i++) {
     p = &CaseFold[i];
@@ -10913,7 +10913,7 @@
     st_add_direct(FoldTable, (st_data_t )p->from, (st_data_t )&(p->to));
   }
 
-  Unfold1Table = st_init_numtable_with_size(1000);
+  Unfold1Table = onig_st_init_numtable_with_size(1000);
   if (ONIG_IS_NULL(Unfold1Table)) return ONIGERR_MEMORY;
 
   for (i = 0; i < (int )(sizeof(CaseUnfold_11)/sizeof(CaseUnfold_11_Type));
@@ -10928,7 +10928,7 @@
     st_add_direct(Unfold1Table, (st_data_t )p1->from, (st_data_t )&(p1->to));
   }
 
-  Unfold2Table = st_init_table_with_size(&type_code2_hash, 200);
+  Unfold2Table = onig_st_init_table_with_size(&type_code2_hash, 200);
   if (ONIG_IS_NULL(Unfold2Table)) return ONIGERR_MEMORY;
 
   for (i = 0; i < (int )(sizeof(CaseUnfold_12)/sizeof(CaseUnfold_12_Type));
@@ -10943,7 +10943,7 @@
     st_add_direct(Unfold2Table, (st_data_t )p2->from, (st_data_t )(&p2->to));
   }
 
-  Unfold3Table = st_init_table_with_size(&type_code3_hash, 30);
+  Unfold3Table = onig_st_init_table_with_size(&type_code3_hash, 30);
   if (ONIG_IS_NULL(Unfold3Table)) return ONIGERR_MEMORY;
 
   for (i = 0; i < (int )(sizeof(CaseUnfold_13)/sizeof(CaseUnfold_13_Type));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091020/a10a19ee/attachment-0001.html>


More information about the macruby-changes mailing list