From nobody at rubyforge.org Sun Sep 5 09:07:22 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 5 Sep 2010 09:07:22 -0400 (EDT) Subject: [ruby-oci8-commit] [411] trunk/ruby-oci8/ext/oci8: * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext /oci8/oci8lib.c, Message-ID: <20100905130722.6C76319782D9@rubyforge.org> Revision: 411 Author: kubo Date: 2010-09-05 09:07:21 -0400 (Sun, 05 Sep 2010) Log Message: ----------- * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, ext/oci8/ocinumber.c: use rb_intern() to retrieve IDs of '+', '-', '*' and '/' on rubinus. * ext/oci8/oradate.c: use rb_call_super() instead of rb_obj_init_copy(), which is not declared in rubinus. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/extconf.rb branches/ruby-oci8-2.0/ext/oci8/oci8.h branches/ruby-oci8-2.0/ext/oci8/oci8lib.c branches/ruby-oci8-2.0/ext/oci8/ocinumber.c branches/ruby-oci8-2.0/ext/oci8/oradate.c trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/extconf.rb trunk/ruby-oci8/ext/oci8/oci8.h trunk/ruby-oci8/ext/oci8/oci8lib.c trunk/ruby-oci8/ext/oci8/ocinumber.c trunk/ruby-oci8/ext/oci8/oradate.c Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-05 13:07:21 UTC (rev 411) @@ -1,3 +1,10 @@ +2010-09-05 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, + ext/oci8/ocinumber.c: use rb_intern() to retrieve IDs of '+', '-', + '*' and '/' on rubinus. + * ext/oci8/oradate.c: use rb_call_super() instead of + rb_obj_init_copy(), which is not declared in rubinus. + 2010-08-28 KUBO Takehiro * ext/oci8/env.c: fix for rubinius. Modified: branches/ruby-oci8-2.0/ext/oci8/extconf.rb =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-09-05 13:07:21 UTC (rev 411) @@ -130,6 +130,9 @@ $defs << "-DInit_oci8lib=Init_#{so_basename}" $defs << "-Doci8lib=#{so_basename}" +if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' + $defs << "-DCHAR_IS_NOT_A_SHORTCUT_TO_ID" +end create_header() Modified: branches/ruby-oci8-2.0/ext/oci8/oci8.h =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oci8.h 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ext/oci8/oci8.h 2010-09-05 13:07:21 UTC (rev 411) @@ -394,6 +394,17 @@ extern ID oci8_id_set; extern ID oci8_id_keys; extern ID oci8_id_oci8_class; +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID +extern ID oci8_id_add_op; /* ID of the addition operator '+' */ +extern ID oci8_id_sub_op; /* ID of the subtraction operator '-' */ +extern ID oci8_id_mul_op; /* ID of the multiplication operator '*' */ +extern ID oci8_id_div_op; /* ID of the division operator '/' */ +#else +#define oci8_id_add_op '+' +#define oci8_id_sub_op '-' +#define oci8_id_mul_op '*' +#define oci8_id_div_op '/' +#endif extern int oci8_in_finalizer; extern VALUE oci8_cOCIHandle; void oci8_base_free(oci8_base_t *base); Modified: branches/ruby-oci8-2.0/ext/oci8/oci8lib.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oci8lib.c 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ext/oci8/oci8lib.c 2010-09-05 13:07:21 UTC (rev 411) @@ -15,6 +15,12 @@ ID oci8_id_set; ID oci8_id_keys; ID oci8_id_oci8_class; +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID +ID oci8_id_add_op; +ID oci8_id_sub_op; +ID oci8_id_mul_op; +ID oci8_id_div_op; +#endif int oci8_in_finalizer = 0; VALUE oci8_cOCIHandle; @@ -65,6 +71,12 @@ oci8_id_set = rb_intern("set"); oci8_id_keys = rb_intern("keys"); oci8_id_oci8_class = rb_intern("__oci8_class__"); +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID + oci8_id_add_op = rb_intern("+"); + oci8_id_sub_op = rb_intern("-"); + oci8_id_mul_op = rb_intern("*"); + oci8_id_div_op = rb_intern("/"); +#endif rb_set_end_proc(at_exit_func, Qnil); Init_oci8_error(); Modified: branches/ruby-oci8-2.0/ext/oci8/ocinumber.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/ocinumber.c 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ext/oci8/ocinumber.c 2010-09-05 13:07:21 UTC (rev 411) @@ -724,13 +724,13 @@ oci_lc(OCINumberAdd(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '+', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_add_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '+', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_add_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '+', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_add_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '+'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_add_op); } /* @@ -758,13 +758,13 @@ oci_lc(OCINumberSub(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '-', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_sub_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '-', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_sub_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '-', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_sub_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '-'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_sub_op); } /* @@ -791,13 +791,13 @@ oci_lc(OCINumberMul(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '*', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_mul_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '*', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_mul_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '*', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_mul_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '*'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_mul_op); } /* @@ -833,13 +833,13 @@ oci_lc(OCINumberDiv(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '/', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_div_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '/', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_div_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '/', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_div_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '/'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_div_op); } /* Modified: branches/ruby-oci8-2.0/ext/oci8/oradate.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oradate.c 2010-08-28 09:26:45 UTC (rev 410) +++ branches/ruby-oci8-2.0/ext/oci8/oradate.c 2010-09-05 13:07:21 UTC (rev 411) @@ -146,7 +146,7 @@ { ora_date_t *l, *r; - rb_obj_init_copy(lhs, rhs); + rb_call_super(1, &rhs); Data_Get_Struct(lhs, ora_date_t, l); Data_Get_Struct(rhs, ora_date_t, r); memcpy(l, r, sizeof(ora_date_t)); Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ChangeLog 2010-09-05 13:07:21 UTC (rev 411) @@ -1,3 +1,10 @@ +2010-09-05 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, + ext/oci8/ocinumber.c: use rb_intern() to retrieve IDs of '+', '-', + '*' and '/' on rubinus. + * ext/oci8/oradate.c: use rb_call_super() instead of + rb_obj_init_copy(), which is not declared in rubinus. + 2010-08-28 KUBO Takehiro * ext/oci8/env.c: fix for rubinius. Modified: trunk/ruby-oci8/ext/oci8/extconf.rb =================================================================== --- trunk/ruby-oci8/ext/oci8/extconf.rb 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ext/oci8/extconf.rb 2010-09-05 13:07:21 UTC (rev 411) @@ -133,6 +133,9 @@ $defs << "-DInit_oci8lib=Init_#{so_basename}" $defs << "-Doci8lib=#{so_basename}" $defs << "-DOCI8LIB_VERSION=\\\"#{RUBY_OCI8_VERSION}\\\"" +if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' + $defs << "-DCHAR_IS_NOT_A_SHORTCUT_TO_ID" +end create_header() Modified: trunk/ruby-oci8/ext/oci8/oci8.h =================================================================== --- trunk/ruby-oci8/ext/oci8/oci8.h 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ext/oci8/oci8.h 2010-09-05 13:07:21 UTC (rev 411) @@ -401,6 +401,17 @@ extern ID oci8_id_set; extern ID oci8_id_keys; extern ID oci8_id_oci8_class; +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID +extern ID oci8_id_add_op; /* ID of the addition operator '+' */ +extern ID oci8_id_sub_op; /* ID of the subtraction operator '-' */ +extern ID oci8_id_mul_op; /* ID of the multiplication operator '*' */ +extern ID oci8_id_div_op; /* ID of the division operator '/' */ +#else +#define oci8_id_add_op '+' +#define oci8_id_sub_op '-' +#define oci8_id_mul_op '*' +#define oci8_id_div_op '/' +#endif extern int oci8_in_finalizer; extern VALUE oci8_cOCIHandle; void oci8_base_free(oci8_base_t *base); Modified: trunk/ruby-oci8/ext/oci8/oci8lib.c =================================================================== --- trunk/ruby-oci8/ext/oci8/oci8lib.c 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ext/oci8/oci8lib.c 2010-09-05 13:07:21 UTC (rev 411) @@ -15,6 +15,12 @@ ID oci8_id_set; ID oci8_id_keys; ID oci8_id_oci8_class; +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID +ID oci8_id_add_op; +ID oci8_id_sub_op; +ID oci8_id_mul_op; +ID oci8_id_div_op; +#endif int oci8_in_finalizer = 0; VALUE oci8_cOCIHandle; @@ -65,6 +71,12 @@ oci8_id_set = rb_intern("set"); oci8_id_keys = rb_intern("keys"); oci8_id_oci8_class = rb_intern("__oci8_class__"); +#ifdef CHAR_IS_NOT_A_SHORTCUT_TO_ID + oci8_id_add_op = rb_intern("+"); + oci8_id_sub_op = rb_intern("-"); + oci8_id_mul_op = rb_intern("*"); + oci8_id_div_op = rb_intern("/"); +#endif rb_set_end_proc(at_exit_func, Qnil); Init_oci8_error(); Modified: trunk/ruby-oci8/ext/oci8/ocinumber.c =================================================================== --- trunk/ruby-oci8/ext/oci8/ocinumber.c 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ext/oci8/ocinumber.c 2010-09-05 13:07:21 UTC (rev 411) @@ -724,13 +724,13 @@ oci_lc(OCINumberAdd(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '+', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_add_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '+', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_add_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '+', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_add_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '+'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_add_op); } /* @@ -758,13 +758,13 @@ oci_lc(OCINumberSub(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '-', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_sub_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '-', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_sub_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '-', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_sub_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '-'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_sub_op); } /* @@ -791,13 +791,13 @@ oci_lc(OCINumberMul(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '*', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_mul_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '*', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_mul_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '*', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_mul_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '*'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_mul_op); } /* @@ -833,13 +833,13 @@ oci_lc(OCINumberDiv(errhp, _NUMBER(lhs), _NUMBER(rhs), &r)); return oci8_make_ocinumber(&r, errhp); case T_FLOAT: - return rb_funcall(onum_to_f(lhs), '/', 1, rhs); + return rb_funcall(onum_to_f(lhs), oci8_id_div_op, 1, rhs); case RBOCI8_T_RATIONAL: - return rb_funcall(onum_to_r(lhs), '/', 1, rhs); + return rb_funcall(onum_to_r(lhs), oci8_id_div_op, 1, rhs); case RBOCI8_T_BIGDECIMAL: - return rb_funcall(onum_to_d(lhs), '/', 1, rhs); + return rb_funcall(onum_to_d(lhs), oci8_id_div_op, 1, rhs); } - return rb_num_coerce_bin(lhs, rhs, '/'); + return rb_num_coerce_bin(lhs, rhs, oci8_id_div_op); } /* Modified: trunk/ruby-oci8/ext/oci8/oradate.c =================================================================== --- trunk/ruby-oci8/ext/oci8/oradate.c 2010-08-28 09:26:45 UTC (rev 410) +++ trunk/ruby-oci8/ext/oci8/oradate.c 2010-09-05 13:07:21 UTC (rev 411) @@ -146,7 +146,7 @@ { ora_date_t *l, *r; - rb_obj_init_copy(lhs, rhs); + rb_call_super(1, &rhs); Data_Get_Struct(lhs, ora_date_t, l); Data_Get_Struct(rhs, ora_date_t, r); memcpy(l, r, sizeof(ora_date_t)); From nobody at rubyforge.org Tue Sep 7 09:45:18 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Tue, 7 Sep 2010 09:45:18 -0400 (EDT) Subject: [ruby-oci8-commit] [412] trunk/ruby-oci8: add "*.rbc" to svn:ignore properties. Message-ID: <20100907134518.6C08E1678318@rubyforge.org> Revision: 412 Author: kubo Date: 2010-09-07 09:45:17 -0400 (Tue, 07 Sep 2010) Log Message: ----------- add "*.rbc" to svn:ignore properties. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/extconf.rb branches/ruby-oci8-2.0/ext/oci8/oci8lib.c branches/ruby-oci8-2.0/lib/oci8.rb.in branches/ruby-oci8-2.0/test/test_array_dml.rb trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/extconf.rb trunk/ruby-oci8/ext/oci8/oci8.c trunk/ruby-oci8/ext/oci8/oci8lib.c trunk/ruby-oci8/lib/oci8.rb.in trunk/ruby-oci8/test/config.rb trunk/ruby-oci8/test/test_array_dml.rb trunk/ruby-oci8/test/test_clob.rb trunk/ruby-oci8/test/test_metadata.rb Property Changed: ---------------- branches/ruby-oci8-2.0/ branches/ruby-oci8-2.0/ext/oci8/ branches/ruby-oci8-2.0/lib/ branches/ruby-oci8-2.0/lib/oci8/ branches/ruby-oci8-2.0/test/ trunk/ruby-oci8/ trunk/ruby-oci8/ext/oci8/ trunk/ruby-oci8/lib/ trunk/ruby-oci8/lib/oci8/ trunk/ruby-oci8/test/ Property changes on: branches/ruby-oci8-2.0 ___________________________________________________________________ Modified: svn:ignore - config.save sqlnet.log + config.save sqlnet.log *.rbc Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-09-05 13:07:21 UTC (rev 411) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-07 13:45:17 UTC (rev 412) @@ -1,3 +1,9 @@ +2010-09-07 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8lib.c: Don't use + rb_set_end_proc() when it isn't available. + * ext/oci8/extconf.rb, lib/oci8.rb.in: add RUBY_ENGINE to + the C extension library name when RUBY_ENGINE is not "ruby." + 2010-09-05 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, ext/oci8/ocinumber.c: use rb_intern() to retrieve IDs of '+', '-', Property changes on: branches/ruby-oci8-2.0/ext/oci8 ___________________________________________________________________ Modified: svn:ignore - Makefile mkmf.log extconf.h depend oci8lib.so apiwrap.c apiwrap.h + Makefile mkmf.log extconf.h depend oci8lib.so apiwrap.c apiwrap.h *.rbc Modified: branches/ruby-oci8-2.0/ext/oci8/extconf.rb =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-09-05 13:07:21 UTC (rev 411) +++ branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -112,6 +112,7 @@ have_func("rb_errinfo", "ruby.h") # ruby 1.9 have_type("rb_blocking_function_t", "ruby.h") +have_func("rb_set_end_proc", "ruby.h") # replace files replace = { @@ -122,11 +123,16 @@ # make ruby script before running create_makefile. replace_keyword(File.dirname(__FILE__) + '/../../lib/oci8.rb.in', '../../lib/oci8.rb', replace) +so_basename = 'oci8lib_' +if defined? RUBY_ENGINE and RUBY_ENGINE != 'ruby' + so_basename += RUBY_ENGINE +end + # Config::CONFIG["ruby_version"] indicates the ruby API version. # 1.8 - ruby 1.8.x # 1.9.1 - ruby 1.9.1 and 1.9.2 # 1.9.x - ruby 1.9.x future version which will break the API compatibility -so_basename = "oci8lib_" + Config::CONFIG["ruby_version"].gsub(/\W/, '') +so_basename += Config::CONFIG["ruby_version"].gsub(/\W/, '') $defs << "-DInit_oci8lib=Init_#{so_basename}" $defs << "-Doci8lib=#{so_basename}" Modified: branches/ruby-oci8-2.0/ext/oci8/oci8lib.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/oci8lib.c 2010-09-05 13:07:21 UTC (rev 411) +++ branches/ruby-oci8-2.0/ext/oci8/oci8lib.c 2010-09-07 13:45:17 UTC (rev 412) @@ -44,10 +44,12 @@ base->hp.ptr = NULL; } +#ifdef HAVE_RB_SET_END_PROC static void at_exit_func(VALUE val) { oci8_in_finalizer = 1; } +#endif void Init_oci8lib() @@ -77,7 +79,9 @@ oci8_id_mul_op = rb_intern("*"); oci8_id_div_op = rb_intern("/"); #endif +#ifdef HAVE_RB_SET_END_PROC rb_set_end_proc(at_exit_func, Qnil); +#endif Init_oci8_error(); Init_oci8_env(); Property changes on: branches/ruby-oci8-2.0/lib ___________________________________________________________________ Modified: svn:ignore - oci8.rb + oci8.rb *.rbc Property changes on: branches/ruby-oci8-2.0/lib/oci8 ___________________________________________________________________ Added: svn:ignore + *.rbc Modified: branches/ruby-oci8-2.0/lib/oci8.rb.in =================================================================== --- branches/ruby-oci8-2.0/lib/oci8.rb.in 2010-09-05 13:07:21 UTC (rev 411) +++ branches/ruby-oci8-2.0/lib/oci8.rb.in 2010-09-07 13:45:17 UTC (rev 412) @@ -18,14 +18,24 @@ end end +so_basename = 'oci8lib_' +if defined? RUBY_ENGINE and RUBY_ENGINE != 'ruby' + so_basename += RUBY_ENGINE +end + +# The suffix number indicates the ruby API version. +# 18 - ruby 1.8.x +# 191 - ruby 1.9.1 and 1.9.2 +# 19x - ruby 1.9.x future version which will break the API compatibility case RUBY_VERSION when /^1\.9/ - require 'oci8lib_191' + so_basename += '191' when /^1\.8/ - require 'oci8lib_18' + so_basename += '18' else raise 'unsupported ruby version: ' + RUBY_VERSION end +require so_basename if OCI8.respond_to? :encoding if defined? DEFAULT_OCI8_ENCODING Property changes on: branches/ruby-oci8-2.0/test ___________________________________________________________________ Added: svn:ignore + *.rbc Modified: branches/ruby-oci8-2.0/test/test_array_dml.rb =================================================================== --- branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-05 13:07:21 UTC (rev 411) +++ branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -13,7 +13,7 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on - def test_array_insert1 + def _test_array_insert1 drop_table('test_table') sql = <<-EOS CREATE TABLE test_table Property changes on: trunk/ruby-oci8 ___________________________________________________________________ Modified: svn:ignore - config.save sqlnet.log + config.save sqlnet.log *.rbc Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/ChangeLog 2010-09-07 13:45:17 UTC (rev 412) @@ -1,3 +1,9 @@ +2010-09-07 KUBO Takehiro + * ext/oci8/extconf.rb, ext/oci8/oci8lib.c: Don't use + rb_set_end_proc() when it isn't available. + * ext/oci8/extconf.rb, lib/oci8.rb.in: add RUBY_ENGINE to + the C extension library name when RUBY_ENGINE is not "ruby." + 2010-09-05 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, ext/oci8/ocinumber.c: use rb_intern() to retrieve IDs of '+', '-', Property changes on: trunk/ruby-oci8/ext/oci8 ___________________________________________________________________ Modified: svn:ignore - Makefile mkmf.log extconf.h depend oci8lib.so apiwrap.c apiwrap.h + Makefile mkmf.log extconf.h depend oci8lib.so apiwrap.c apiwrap.h *.rbc Modified: trunk/ruby-oci8/ext/oci8/extconf.rb =================================================================== --- trunk/ruby-oci8/ext/oci8/extconf.rb 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/ext/oci8/extconf.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -114,6 +114,7 @@ have_func("rb_errinfo", "ruby.h") # ruby 1.9 have_type("rb_blocking_function_t", "ruby.h") +have_func("rb_set_end_proc", "ruby.h") # replace files replace = { @@ -124,11 +125,16 @@ # make ruby script before running create_makefile. replace_keyword(File.dirname(__FILE__) + '/../../lib/oci8.rb.in', '../../lib/oci8.rb', replace) +so_basename = 'oci8lib_' +if defined? RUBY_ENGINE and RUBY_ENGINE != 'ruby' + so_basename += RUBY_ENGINE +end + # Config::CONFIG["ruby_version"] indicates the ruby API version. # 1.8 - ruby 1.8.x # 1.9.1 - ruby 1.9.1 and 1.9.2 # 1.9.x - ruby 1.9.x future version which will break the API compatibility -so_basename = "oci8lib_" + Config::CONFIG["ruby_version"].gsub(/\W/, '') +so_basename += Config::CONFIG["ruby_version"].gsub(/\W/, '') $defs << "-DInit_oci8lib=Init_#{so_basename}" $defs << "-Doci8lib=#{so_basename}" Modified: trunk/ruby-oci8/ext/oci8/oci8.c =================================================================== --- trunk/ruby-oci8/ext/oci8/oci8.c 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/ext/oci8/oci8.c 2010-09-07 13:45:17 UTC (rev 412) @@ -453,10 +453,10 @@ #else sb1 non_blocking; - if (svcctx->srvhp == NULL) { - oci_lc(OCIAttrGet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, &svcctx->srvhp, 0, OCI_ATTR_SERVER, oci8_errhp)); + if (svcctx->server->hp.srvhp == NULL) { + oci_lc(OCIAttrGet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, &svcctx->server->hp.srvhp, 0, OCI_ATTR_SERVER, oci8_errhp)); } - oci_lc(OCIAttrGet(svcctx->srvhp, OCI_HTYPE_SERVER, &non_blocking, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); + oci_lc(OCIAttrGet(svcctx->server->hp.srvhp, OCI_HTYPE_SERVER, &non_blocking, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); return non_blocking ? Qtrue : Qfalse; #endif } @@ -506,13 +506,13 @@ #else sb1 non_blocking; - if (svcctx->srvhp == NULL) { - oci_lc(OCIAttrGet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, &svcctx->srvhp, 0, OCI_ATTR_SERVER, oci8_errhp)); + if (svcctx->server->hp.srvhp == NULL) { + oci_lc(OCIAttrGet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, &svcctx->server->hp.srvhp, 0, OCI_ATTR_SERVER, oci8_errhp)); } - oci_lc(OCIAttrGet(svcctx->srvhp, OCI_HTYPE_SERVER, &non_blocking, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); + oci_lc(OCIAttrGet(svcctx->server->hp.srvhp, OCI_HTYPE_SERVER, &non_blocking, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); if ((RTEST(val) && !non_blocking) || (!RTEST(val) && non_blocking)) { /* toggle blocking / non-blocking. */ - oci_lc(OCIAttrSet(svcctx->srvhp, OCI_HTYPE_SERVER, 0, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); + oci_lc(OCIAttrSet(svcctx->server->hp.srvhp, OCI_HTYPE_SERVER, 0, 0, OCI_ATTR_NONBLOCKING_MODE, oci8_errhp)); } #endif return val; Modified: trunk/ruby-oci8/ext/oci8/oci8lib.c =================================================================== --- trunk/ruby-oci8/ext/oci8/oci8lib.c 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/ext/oci8/oci8lib.c 2010-09-07 13:45:17 UTC (rev 412) @@ -44,10 +44,12 @@ base->hp.ptr = NULL; } +#ifdef HAVE_RB_SET_END_PROC static void at_exit_func(VALUE val) { oci8_in_finalizer = 1; } +#endif void Init_oci8lib() @@ -77,7 +79,9 @@ oci8_id_mul_op = rb_intern("*"); oci8_id_div_op = rb_intern("/"); #endif +#ifdef HAVE_RB_SET_END_PROC rb_set_end_proc(at_exit_func, Qnil); +#endif Init_oci8_error(); Init_oci8_env(); Property changes on: trunk/ruby-oci8/lib ___________________________________________________________________ Modified: svn:ignore - oci8.rb + oci8.rb *.rbc Property changes on: trunk/ruby-oci8/lib/oci8 ___________________________________________________________________ Added: svn:ignore + *.rbc Modified: trunk/ruby-oci8/lib/oci8.rb.in =================================================================== --- trunk/ruby-oci8/lib/oci8.rb.in 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/lib/oci8.rb.in 2010-09-07 13:45:17 UTC (rev 412) @@ -18,12 +18,20 @@ end end -so_basename = nil +so_basename = 'oci8lib_' +if defined? RUBY_ENGINE and RUBY_ENGINE != 'ruby' + so_basename += RUBY_ENGINE +end + +# The suffix number indicates the ruby API version. +# 18 - ruby 1.8.x +# 191 - ruby 1.9.1 and 1.9.2 +# 19x - ruby 1.9.x future version which will break the API compatibility case RUBY_VERSION when /^1\.9/ - so_basename = 'oci8lib_191' + so_basename += '191' when /^1\.8/ - so_basename = 'oci8lib_18' + so_basename += '18' else raise 'unsupported ruby version: ' + RUBY_VERSION end Property changes on: trunk/ruby-oci8/test ___________________________________________________________________ Added: svn:ignore + *.rbc Modified: trunk/ruby-oci8/test/config.rb =================================================================== --- trunk/ruby-oci8/test/config.rb 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/test/config.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -103,6 +103,19 @@ end end end # drop_table + + def drop_type(type_name) + begin + @conn.exec("DROP TYPE BODY #{type_name}") + rescue OCIError + raise if $!.code != 4043 + end + begin + @conn.exec("DROP TYPE #{type_name}") + rescue OCIError + raise if $!.code != 4043 + end + end # drop_type end end end Modified: trunk/ruby-oci8/test/test_array_dml.rb =================================================================== --- trunk/ruby-oci8/test/test_array_dml.rb 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/test/test_array_dml.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -13,7 +13,7 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on - def test_array_insert1 + def _test_array_insert1 drop_table('test_table') sql = <<-EOS CREATE TABLE test_table Modified: trunk/ruby-oci8/test/test_clob.rb =================================================================== --- trunk/ruby-oci8/test/test_clob.rb 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/test/test_clob.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -7,15 +7,15 @@ def setup @conn = get_oci8_connection - drop_table('test_clob') - @conn.exec('CREATE TABLE test_clob (filename VARCHAR2(40), content CLOB)') + drop_table('test_table') + @conn.exec('CREATE TABLE test_table (filename VARCHAR2(40), content CLOB)') end def test_insert filename = File.basename($lobfile) - @conn.exec("DELETE FROM test_clob WHERE filename = :1", filename) - @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", filename) - cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename) + @conn.exec("DELETE FROM test_table WHERE filename = :1", filename) + @conn.exec("INSERT INTO test_table(filename, content) VALUES (:1, EMPTY_CLOB())", filename) + cursor = @conn.exec("SELECT content FROM test_table WHERE filename = :1 FOR UPDATE", filename) lob = cursor.fetch[0] open($lobfile) do |f| while f.gets() @@ -27,9 +27,9 @@ def test_insert_with_flush filename = File.basename($lobfile) - @conn.exec("DELETE FROM test_clob WHERE filename = :1", filename) - @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", filename) - cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename) + @conn.exec("DELETE FROM test_table WHERE filename = :1", filename) + @conn.exec("INSERT INTO test_table(filename, content) VALUES (:1, EMPTY_CLOB())", filename) + cursor = @conn.exec("SELECT content FROM test_table WHERE filename = :1 FOR UPDATE", filename) lob = cursor.fetch[0] lob.sync = false open($lobfile) do |f| @@ -44,9 +44,9 @@ def test_insert_symbol filename = 'test_symbol' value = :foo_bar - @conn.exec("DELETE FROM test_clob WHERE filename = :1", filename) - @conn.exec("INSERT INTO test_clob(filename, content) VALUES (:1, EMPTY_CLOB())", filename) - cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename) + @conn.exec("DELETE FROM test_table WHERE filename = :1", filename) + @conn.exec("INSERT INTO test_table(filename, content) VALUES (:1, EMPTY_CLOB())", filename) + cursor = @conn.exec("SELECT content FROM test_table WHERE filename = :1 FOR UPDATE", filename) lob = cursor.fetch[0] lob.write(value) lob.rewind @@ -57,7 +57,7 @@ def test_read test_insert() # first insert data. filename = File.basename($lobfile) - cursor = @conn.exec("SELECT content FROM test_clob WHERE filename = :1 FOR UPDATE", filename) + cursor = @conn.exec("SELECT content FROM test_table WHERE filename = :1 FOR UPDATE", filename) lob = cursor.fetch[0] open($lobfile) do |f| @@ -76,7 +76,7 @@ end def teardown - drop_table('test_clob') + drop_table('test_table') @conn.logoff end end Modified: trunk/ruby-oci8/test/test_metadata.rb =================================================================== --- trunk/ruby-oci8/test/test_metadata.rb 2010-09-05 13:07:21 UTC (rev 411) +++ trunk/ruby-oci8/test/test_metadata.rb 2010-09-07 13:45:17 UTC (rev 412) @@ -101,7 +101,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "CHAR(10 CHAR)", :oraver => ora90, @@ -114,7 +114,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "NCHAR(10)", :oraver => ora80, @@ -127,7 +127,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "VARCHAR2(10)", :oraver => ora80, @@ -140,7 +140,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "VARCHAR2(10 CHAR)", :oraver => ora90, @@ -153,7 +153,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "NVARCHAR2(10)", :oraver => ora80, @@ -166,7 +166,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "RAW(10)", :oraver => ora80, @@ -179,7 +179,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), # Skip tests for data_size of CLOB, NCLOB and BLOB @@ -206,7 +206,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "NCLOB", :oraver => ora81, @@ -219,7 +219,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "BLOB", :oraver => ora80, @@ -232,7 +232,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "BFILE", :oraver => ora80, @@ -245,7 +245,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), # Skip tests for fsprecision and lfprecision for NUMBER and FLOAT @@ -281,7 +281,7 @@ :precision => 0, :scale => $oracle_version > ora90 ? -127 : 0, :fsprecision => :skip, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "NUMBER(10)", :oraver => ora80, @@ -294,7 +294,7 @@ :precision => 10, :scale => 0, :fsprecision => :skip, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "NUMBER(10,2)", :oraver => ora80, @@ -307,7 +307,7 @@ :precision => 10, :scale => 2, :fsprecision => :skip, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "FLOAT", :oraver => ora80, @@ -320,7 +320,7 @@ :precision => 126, :scale => -127, :fsprecision => :skip, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "FLOAT(10)", :oraver => ora80, @@ -333,7 +333,7 @@ :precision => 10, :scale => -127, :fsprecision => :skip, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "BINARY_FLOAT", :oraver => ora101, @@ -346,7 +346,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "BINARY_DOUBLE", :oraver => ora101, @@ -359,7 +359,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), DatatypeData.new(:data_type_string => "DATE", :oraver => ora80, @@ -372,7 +372,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), # Skip tests for precision and lfprecision for TIMESTAMP @@ -411,7 +411,7 @@ :precision => :skip, :scale => 6, :fsprecision => 6, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "TIMESTAMP(9)", :oraver => ora90, @@ -424,7 +424,7 @@ :precision => :skip, :scale => 9, :fsprecision => 9, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "TIMESTAMP WITH TIME ZONE", :oraver => ora90, @@ -437,7 +437,7 @@ :precision => :skip, :scale => 6, :fsprecision => 6, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "TIMESTAMP(9) WITH TIME ZONE", :oraver => ora90, @@ -450,7 +450,7 @@ :precision => :skip, :scale => 9, :fsprecision => 9, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "TIMESTAMP WITH LOCAL TIME ZONE", :oraver => ora90, @@ -463,7 +463,7 @@ :precision => :skip, :scale => 6, :fsprecision => 6, - :lfprecision => :skip, + :lfprecision => :skip ), DatatypeData.new(:data_type_string => "TIMESTAMP(9) WITH LOCAL TIME ZONE", :oraver => ora90, @@ -476,7 +476,7 @@ :precision => :skip, :scale => 9, :fsprecision => 9, - :lfprecision => :skip, + :lfprecision => :skip ), # Skip tsets for scale and fsprecision for INTERVAL YEAR TO MONTH @@ -503,7 +503,7 @@ :precision => 2, :scale => :skip, :fsprecision => :skip, - :lfprecision => 2, + :lfprecision => 2 ), DatatypeData.new(:data_type_string => "INTERVAL YEAR(4) TO MONTH", :oraver => ora90, @@ -516,7 +516,7 @@ :precision => 4, :scale => :skip, :fsprecision => :skip, - :lfprecision => 4, + :lfprecision => 4 ), # Skip tests for precision and scale for INTERVAL DAY TO SECOND # because their values depend on how they are described. @@ -542,7 +542,7 @@ :precision => :skip, :scale => :skip, :fsprecision => 6, - :lfprecision => 2, + :lfprecision => 2 ), DatatypeData.new(:data_type_string => "INTERVAL DAY(4) TO SECOND(9)", :oraver => ora90, @@ -555,7 +555,7 @@ :precision => :skip, :scale => :skip, :fsprecision => 9, - :lfprecision => 4, + :lfprecision => 4 ), # Object Types DatatypeData.new(:data_type_string => "MDSYS.SDO_GEOMETRY", @@ -569,7 +569,7 @@ :precision => 0, :scale => 0, :fsprecision => 0, - :lfprecision => 0, + :lfprecision => 0 ), =begin # uncomment after ref is supported. DatatypeData.new(:data_type_string => "REF MDSYS.SDO_GEOMETRY", From nobody at rubyforge.org Tue Sep 7 10:17:54 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Tue, 7 Sep 2010 10:17:54 -0400 (EDT) Subject: [ruby-oci8-commit] [413] trunk/ruby-oci8/test: fix ChangeLog for the unexpectedly committed changes. Message-ID: <20100907141754.6A2FC167831D@rubyforge.org> Revision: 413 Author: kubo Date: 2010-09-07 10:17:54 -0400 (Tue, 07 Sep 2010) Log Message: ----------- fix ChangeLog for the unexpectedly committed changes. disable test_array_insert1 only on rubinius. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/test/test_array_dml.rb trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/test/test_array_dml.rb Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-09-07 13:45:17 UTC (rev 412) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-07 14:17:54 UTC (rev 413) @@ -3,6 +3,8 @@ rb_set_end_proc() when it isn't available. * ext/oci8/extconf.rb, lib/oci8.rb.in: add RUBY_ENGINE to the C extension library name when RUBY_ENGINE is not "ruby." + * test/test_array_dml.rb: skip test_array_insert1 on rubinius. + This will be enabled after the rubinius issue #445 is fixed. 2010-09-05 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, Modified: branches/ruby-oci8-2.0/test/test_array_dml.rb =================================================================== --- branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-07 13:45:17 UTC (rev 412) +++ branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-07 14:17:54 UTC (rev 413) @@ -13,7 +13,9 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on - def _test_array_insert1 + def test_array_insert1 + # skip this test until the rubinius issue #445 is fixed. + return if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' drop_table('test_table') sql = <<-EOS CREATE TABLE test_table Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-09-07 13:45:17 UTC (rev 412) +++ trunk/ruby-oci8/ChangeLog 2010-09-07 14:17:54 UTC (rev 413) @@ -3,6 +3,14 @@ rb_set_end_proc() when it isn't available. * ext/oci8/extconf.rb, lib/oci8.rb.in: add RUBY_ENGINE to the C extension library name when RUBY_ENGINE is not "ruby." + * ext/oci8/oci8.c: fix for ruby 1.8. + * test/test_clob.rb: change a temporarily used table name for test + from 'test_clob' to 'test_table.' + * test/test_metadata.rb: delete ruby 1.9 feature to work on ruby 1.8. + * test/config.rb: add a support function 'drop_type' for future test + cases. + * test/test_array_dml.rb: skip test_array_insert1 on rubinius. + This will be enabled after the rubinius issue #445 is fixed. 2010-09-05 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8.h, ext/oci8/oci8lib.c, Modified: trunk/ruby-oci8/test/test_array_dml.rb =================================================================== --- trunk/ruby-oci8/test/test_array_dml.rb 2010-09-07 13:45:17 UTC (rev 412) +++ trunk/ruby-oci8/test/test_array_dml.rb 2010-09-07 14:17:54 UTC (rev 413) @@ -13,7 +13,9 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on - def _test_array_insert1 + def test_array_insert1 + # skip this test until the rubinius issue #445 is fixed. + return if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' drop_table('test_table') sql = <<-EOS CREATE TABLE test_table From nobody at rubyforge.org Fri Sep 10 08:38:41 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 10 Sep 2010 08:38:41 -0400 (EDT) Subject: [ruby-oci8-commit] [414] trunk/ruby-oci8/test: * test/test_array_dml.rb: delete workaround code. Message-ID: <20100910123841.9CDF71858372@rubyforge.org> Revision: 414 Author: kubo Date: 2010-09-10 08:38:41 -0400 (Fri, 10 Sep 2010) Log Message: ----------- * test/test_array_dml.rb: delete workaround code. It now works fine on rubinius head. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/test/test_array_dml.rb trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/test/test_array_dml.rb Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-09-07 14:17:54 UTC (rev 413) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-10 12:38:41 UTC (rev 414) @@ -1,3 +1,7 @@ +2010-09-10 KUBO Takehiro + * test/test_array_dml.rb: delete workaround code. It now works + fine on rubinius head. + 2010-09-07 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8lib.c: Don't use rb_set_end_proc() when it isn't available. Modified: branches/ruby-oci8-2.0/test/test_array_dml.rb =================================================================== --- branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-07 14:17:54 UTC (rev 413) +++ branches/ruby-oci8-2.0/test/test_array_dml.rb 2010-09-10 12:38:41 UTC (rev 414) @@ -14,8 +14,6 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on def test_array_insert1 - # skip this test until the rubinius issue #445 is fixed. - return if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' drop_table('test_table') sql = <<-EOS CREATE TABLE test_table Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-09-07 14:17:54 UTC (rev 413) +++ trunk/ruby-oci8/ChangeLog 2010-09-10 12:38:41 UTC (rev 414) @@ -1,3 +1,7 @@ +2010-09-10 KUBO Takehiro + * test/test_array_dml.rb: delete workaround code. It now works + fine on rubinius head. + 2010-09-07 KUBO Takehiro * ext/oci8/extconf.rb, ext/oci8/oci8lib.c: Don't use rb_set_end_proc() when it isn't available. Modified: trunk/ruby-oci8/test/test_array_dml.rb =================================================================== --- trunk/ruby-oci8/test/test_array_dml.rb 2010-09-07 14:17:54 UTC (rev 413) +++ trunk/ruby-oci8/test/test_array_dml.rb 2010-09-10 12:38:41 UTC (rev 414) @@ -14,8 +14,6 @@ # test inserting arrays with different data types # including char, varchar2, number, date and so on def test_array_insert1 - # skip this test until the rubinius issue #445 is fixed. - return if defined? RUBY_ENGINE and RUBY_ENGINE == 'rbx' drop_table('test_table') sql = <<-EOS CREATE TABLE test_table From nobody at rubyforge.org Sun Sep 12 08:50:44 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 12 Sep 2010 08:50:44 -0400 (EDT) Subject: [ruby-oci8-commit] [415] trunk/ruby-oci8: * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning Message-ID: <20100912125044.D4F46197828C@rubyforge.org> Revision: 415 Author: kubo Date: 2010-09-12 08:50:44 -0400 (Sun, 12 Sep 2010) Log Message: ----------- * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning 'use "ruby/util.h" instead of bare "util.h".' * test/test_break.rb: make tests insensitive to execution timing. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/env.c branches/ruby-oci8-2.0/ext/oci8/extconf.rb branches/ruby-oci8-2.0/test/test_break.rb trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/env.c trunk/ruby-oci8/ext/oci8/extconf.rb trunk/ruby-oci8/test/test_break.rb Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-09-10 12:38:41 UTC (rev 414) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-12 12:50:44 UTC (rev 415) @@ -1,3 +1,8 @@ +2010-09-12 KUBO Takehiro + * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning + 'use "ruby/util.h" instead of bare "util.h".' + * test/test_break.rb: make tests insensitive to execution timing. + 2010-09-10 KUBO Takehiro * test/test_array_dml.rb: delete workaround code. It now works fine on rubinius head. Modified: branches/ruby-oci8-2.0/ext/oci8/env.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/env.c 2010-09-10 12:38:41 UTC (rev 414) +++ branches/ruby-oci8-2.0/ext/oci8/env.c 2010-09-12 12:50:44 UTC (rev 415) @@ -6,23 +6,12 @@ */ #include "oci8.h" -#if defined(HAVE_UTIL_H) -/* ruby_setenv for workaround ruby 1.8.4 */ +#if defined(HAVE_RUBY_UTIL_H) +#include +#elif defined(HAVE_UTIL_H) #include #endif -#ifdef _WIN32 -#ifdef HAVE_RUBY_WIN32_H -#include /* for rb_w32_getenv() */ -#else -#include /* for rb_w32_getenv() */ -#endif -#endif - -#ifdef HAVE_RUBY_UTIL_H -#include -#endif - #ifdef HAVE_TYPE_RB_BLOCKING_FUNCTION_T ub4 oci8_env_mode = OCI_OBJECT | OCI_THREADED; #else Modified: branches/ruby-oci8-2.0/ext/oci8/extconf.rb =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-09-10 12:38:41 UTC (rev 414) +++ branches/ruby-oci8-2.0/ext/oci8/extconf.rb 2010-09-12 12:50:44 UTC (rev 415) @@ -105,6 +105,7 @@ have_header("intern.h") have_header("util.h") # ruby 1.9 headers +have_header("ruby/util.h") have_type('rb_encoding', ['ruby/ruby.h', 'ruby/encoding.h']) # $! in C API Modified: branches/ruby-oci8-2.0/test/test_break.rb =================================================================== --- branches/ruby-oci8-2.0/test/test_break.rb 2010-09-10 12:38:41 UTC (rev 414) +++ branches/ruby-oci8-2.0/test/test_break.rb 2010-09-12 12:50:44 UTC (rev 415) @@ -23,23 +23,22 @@ TIME_IN_PLSQL = 5 TIME_TO_BREAK = 2 - MARGIN = 0.1 def do_test_ocibreak(conn, expect) $start_time = Time.now th = Thread.start do begin - conn.exec("BEGIN DBMS_LOCK.SLEEP(#{TIME_IN_PLSQL}); END;") - assert_equal(expect[PLSQL_DONE], (Time.now - $start_time + MARGIN).to_i, 'PLSQL_DONE') + conn.exec("BEGIN DBMS_LOCK.SLEEP(#{TIME_IN_PLSQL}); END;") + assert_equal(expect[PLSQL_DONE], (Time.now - $start_time).round, 'PLSQL_DONE') rescue OCIBreak - assert_equal(expect[OCIBREAK], (Time.now - $start_time + MARGIN).to_i, 'OCIBREAK') + assert_equal(expect[OCIBREAK], (Time.now - $start_time).round, 'OCIBREAK') end end - sleep(0.01) # make a time to run DBMS_LOCK.SLEEP - sleep(TIME_TO_BREAK) - assert_equal(expect[SEND_BREAK], (Time.now - $start_time + MARGIN).to_i, 'SEND_BREAK') + sleep(0.3) # Wait until DBMS_LOCK.SLEEP is running. + sleep(TIME_TO_BREAK - 0.3) + assert_equal(expect[SEND_BREAK], (Time.now - $start_time).round, 'SEND_BREAK') conn.break() th.join end Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-09-10 12:38:41 UTC (rev 414) +++ trunk/ruby-oci8/ChangeLog 2010-09-12 12:50:44 UTC (rev 415) @@ -1,3 +1,8 @@ +2010-09-12 KUBO Takehiro + * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning + 'use "ruby/util.h" instead of bare "util.h".' + * test/test_break.rb: make tests insensitive to execution timing. + 2010-09-10 KUBO Takehiro * test/test_array_dml.rb: delete workaround code. It now works fine on rubinius head. Modified: trunk/ruby-oci8/ext/oci8/env.c =================================================================== --- trunk/ruby-oci8/ext/oci8/env.c 2010-09-10 12:38:41 UTC (rev 414) +++ trunk/ruby-oci8/ext/oci8/env.c 2010-09-12 12:50:44 UTC (rev 415) @@ -6,23 +6,12 @@ */ #include "oci8.h" -#if defined(HAVE_UTIL_H) -/* ruby_setenv for workaround ruby 1.8.4 */ +#if defined(HAVE_RUBY_UTIL_H) +#include +#elif defined(HAVE_UTIL_H) #include #endif -#ifdef _WIN32 -#ifdef HAVE_RUBY_WIN32_H -#include /* for rb_w32_getenv() */ -#else -#include /* for rb_w32_getenv() */ -#endif -#endif - -#ifdef HAVE_RUBY_UTIL_H -#include -#endif - #ifdef HAVE_TYPE_RB_BLOCKING_FUNCTION_T ub4 oci8_env_mode = OCI_OBJECT | OCI_THREADED; #else Modified: trunk/ruby-oci8/ext/oci8/extconf.rb =================================================================== --- trunk/ruby-oci8/ext/oci8/extconf.rb 2010-09-10 12:38:41 UTC (rev 414) +++ trunk/ruby-oci8/ext/oci8/extconf.rb 2010-09-12 12:50:44 UTC (rev 415) @@ -107,6 +107,7 @@ have_header("intern.h") have_header("util.h") # ruby 1.9 headers +have_header("ruby/util.h") have_type('rb_encoding', ['ruby/ruby.h', 'ruby/encoding.h']) # $! in C API Modified: trunk/ruby-oci8/test/test_break.rb =================================================================== --- trunk/ruby-oci8/test/test_break.rb 2010-09-10 12:38:41 UTC (rev 414) +++ trunk/ruby-oci8/test/test_break.rb 2010-09-12 12:50:44 UTC (rev 415) @@ -23,23 +23,22 @@ TIME_IN_PLSQL = 5 TIME_TO_BREAK = 2 - MARGIN = 0.1 def do_test_ocibreak(conn, expect) $start_time = Time.now th = Thread.start do begin - conn.exec("BEGIN DBMS_LOCK.SLEEP(#{TIME_IN_PLSQL}); END;") - assert_equal(expect[PLSQL_DONE], (Time.now - $start_time + MARGIN).to_i, 'PLSQL_DONE') + conn.exec("BEGIN DBMS_LOCK.SLEEP(#{TIME_IN_PLSQL}); END;") + assert_equal(expect[PLSQL_DONE], (Time.now - $start_time).round, 'PLSQL_DONE') rescue OCIBreak - assert_equal(expect[OCIBREAK], (Time.now - $start_time + MARGIN).to_i, 'OCIBREAK') + assert_equal(expect[OCIBREAK], (Time.now - $start_time).round, 'OCIBREAK') end end - sleep(0.01) # make a time to run DBMS_LOCK.SLEEP - sleep(TIME_TO_BREAK) - assert_equal(expect[SEND_BREAK], (Time.now - $start_time + MARGIN).to_i, 'SEND_BREAK') + sleep(0.3) # Wait until DBMS_LOCK.SLEEP is running. + sleep(TIME_TO_BREAK - 0.3) + assert_equal(expect[SEND_BREAK], (Time.now - $start_time).round, 'SEND_BREAK') conn.break() th.join end From nobody at rubyforge.org Sat Sep 18 09:33:11 2010 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 18 Sep 2010 09:33:11 -0400 (EDT) Subject: [ruby-oci8-commit] [416] trunk/ruby-oci8: * ext/oci8/win32.c: undefine boolean to pass compilation on Message-ID: <20100918133311.A4D481779943@rubyforge.org> Revision: 416 Author: kubo Date: 2010-09-18 09:33:11 -0400 (Sat, 18 Sep 2010) Log Message: ----------- * ext/oci8/win32.c: undefine boolean to pass compilation on Cygwin. (reported by Don Hill). * lib/oci8/encoding-init.rb, lib/oci8/encoding.yml: add a mapping from ZHT16HKSCS to Big5-HKSCS when the latter is available in ruby. Modified Paths: -------------- branches/ruby-oci8-2.0/ChangeLog branches/ruby-oci8-2.0/ext/oci8/win32.c branches/ruby-oci8-2.0/lib/oci8/encoding-init.rb branches/ruby-oci8-2.0/lib/oci8/encoding.yml trunk/ruby-oci8/ChangeLog trunk/ruby-oci8/ext/oci8/win32.c trunk/ruby-oci8/lib/oci8/encoding-init.rb trunk/ruby-oci8/lib/oci8/encoding.yml Modified: branches/ruby-oci8-2.0/ChangeLog =================================================================== --- branches/ruby-oci8-2.0/ChangeLog 2010-09-12 12:50:44 UTC (rev 415) +++ branches/ruby-oci8-2.0/ChangeLog 2010-09-18 13:33:11 UTC (rev 416) @@ -1,3 +1,10 @@ +2010-09-18 KUBO Takehiro + * ext/oci8/win32.c: undefine boolean to pass compilation on + Cygwin. (reported by Don Hill). + * lib/oci8/encoding-init.rb, lib/oci8/encoding.yml: add a + mapping from ZHT16HKSCS to Big5-HKSCS when the latter + is available in ruby. + 2010-09-12 KUBO Takehiro * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning 'use "ruby/util.h" instead of bare "util.h".' Modified: branches/ruby-oci8-2.0/ext/oci8/win32.c =================================================================== --- branches/ruby-oci8-2.0/ext/oci8/win32.c 2010-09-12 12:50:44 UTC (rev 415) +++ branches/ruby-oci8-2.0/ext/oci8/win32.c 2010-09-18 13:33:11 UTC (rev 416) @@ -2,9 +2,15 @@ /* win32.c - part of ruby-oci8 - Copyright (C) 2009 KUBO Takehiro + Copyright (C) 2009-2010 KUBO Takehiro */ #include "oci8.h" +#ifdef __CYGWIN__ +/* boolean is defined as a macro in oratypes.h. + * It conflicts with the definition in windows.h. + */ +#undef boolean +#endif #include NORETURN(static void raise_error(void)); @@ -84,14 +90,14 @@ } /* Get ORACLE_HOME */ name_len = sizeof(name); - rv = RegQueryValueEx(arg->hSubKey, "ORACLE_HOME", NULL, &type, name, &name_len); + rv = RegQueryValueEx(arg->hSubKey, "ORACLE_HOME", NULL, &type, TO_ORATEXT(name), &name_len); if (rv != ERROR_SUCCESS || type != REG_SZ) { continue; } oracle_home = rb_locale_str_new_cstr(name); /* Get NLS_LANG */ name_len = sizeof(name); - rv = RegQueryValueEx(arg->hSubKey, "NLS_LANG", NULL, &type, name, &name_len); + rv = RegQueryValueEx(arg->hSubKey, "NLS_LANG", NULL, &type, TO_ORATEXT(name), &name_len); if (rv != ERROR_SUCCESS || type != REG_SZ) { continue; } Modified: branches/ruby-oci8-2.0/lib/oci8/encoding-init.rb =================================================================== --- branches/ruby-oci8-2.0/lib/oci8/encoding-init.rb 2010-09-12 12:50:44 UTC (rev 415) +++ branches/ruby-oci8-2.0/lib/oci8/encoding-init.rb 2010-09-18 13:33:11 UTC (rev 416) @@ -5,7 +5,8 @@ # try to get NLS_LANG. nls_lang = ENV['NLS_LANG'] -if defined? OCI8::Win32Util +# if NLS_LANG is not set, get it from the Windows registry. +if nls_lang.nil? and defined? OCI8::Win32Util dll_path = OCI8::Win32Util.dll_path.upcase if dll_path =~ %r{\\BIN\\OCI.DLL} oracle_home = $` @@ -33,6 +34,10 @@ if enc.nil? raise "Ruby encoding name is not found in encoding.yml for NLS_LANG #{nls_lang}." end + if enc.is_a? Array + # Use the first available encoding in the array. + enc = enc.find do |e| Encoding.find(e) rescue false; end + end else warn "Warning: NLS_LANG is not set. fallback to US-ASCII." enc = 'US-ASCII' Modified: branches/ruby-oci8-2.0/lib/oci8/encoding.yml =================================================================== --- branches/ruby-oci8-2.0/lib/oci8/encoding.yml 2010-09-12 12:50:44 UTC (rev 415) +++ branches/ruby-oci8-2.0/lib/oci8/encoding.yml 2010-09-18 13:33:11 UTC (rev 416) @@ -40,7 +40,7 @@ # MS Windows Code Page 950 with Hong Kong Supplementary Character # Set HKSCS-2001 (character set conversion to and from Unicode is # based on Unicode 3.0) -ZHT16HKSCS: Big5 # Does the Big5 include HKSCS? +ZHT16HKSCS: [Big5-HKSCS, Big5] # MS Windows Code Page 950 Traditional Chinese ZHT16MSWIN950: Big5 @@ -166,7 +166,7 @@ # MS Windows Code Page 950 with Hong Kong Supplementary Character # Set HKSCS-2001 (character set conversion to and from Unicode is # based on Unicode 3.1) -ZHT16HKSCS31: Big5 # Does the Big5 include HKSCS? +ZHT16HKSCS31: [Big5-HKSCS, Big5] # SOPS 32-bit Traditional Chinese ZHT32SOPS: nil # FIXME Modified: trunk/ruby-oci8/ChangeLog =================================================================== --- trunk/ruby-oci8/ChangeLog 2010-09-12 12:50:44 UTC (rev 415) +++ trunk/ruby-oci8/ChangeLog 2010-09-18 13:33:11 UTC (rev 416) @@ -1,3 +1,10 @@ +2010-09-18 KUBO Takehiro + * ext/oci8/win32.c: undefine boolean to pass compilation on + Cygwin. (reported by Don Hill). + * lib/oci8/encoding-init.rb, lib/oci8/encoding.yml: add a + mapping from ZHT16HKSCS to Big5-HKSCS when the latter + is available in ruby. + 2010-09-12 KUBO Takehiro * ext/oci8/env.c, ext/oci8/extconf.rb: suppress warning 'use "ruby/util.h" instead of bare "util.h".' Modified: trunk/ruby-oci8/ext/oci8/win32.c =================================================================== --- trunk/ruby-oci8/ext/oci8/win32.c 2010-09-12 12:50:44 UTC (rev 415) +++ trunk/ruby-oci8/ext/oci8/win32.c 2010-09-18 13:33:11 UTC (rev 416) @@ -2,9 +2,15 @@ /* win32.c - part of ruby-oci8 - Copyright (C) 2009 KUBO Takehiro + Copyright (C) 2009-2010 KUBO Takehiro */ #include "oci8.h" +#ifdef __CYGWIN__ +/* boolean is defined as a macro in oratypes.h. + * It conflicts with the definition in windows.h. + */ +#undef boolean +#endif #include NORETURN(static void raise_error(void)); @@ -84,14 +90,14 @@ } /* Get ORACLE_HOME */ name_len = sizeof(name); - rv = RegQueryValueEx(arg->hSubKey, "ORACLE_HOME", NULL, &type, name, &name_len); + rv = RegQueryValueEx(arg->hSubKey, "ORACLE_HOME", NULL, &type, TO_ORATEXT(name), &name_len); if (rv != ERROR_SUCCESS || type != REG_SZ) { continue; } oracle_home = rb_locale_str_new_cstr(name); /* Get NLS_LANG */ name_len = sizeof(name); - rv = RegQueryValueEx(arg->hSubKey, "NLS_LANG", NULL, &type, name, &name_len); + rv = RegQueryValueEx(arg->hSubKey, "NLS_LANG", NULL, &type, TO_ORATEXT(name), &name_len); if (rv != ERROR_SUCCESS || type != REG_SZ) { continue; } Modified: trunk/ruby-oci8/lib/oci8/encoding-init.rb =================================================================== --- trunk/ruby-oci8/lib/oci8/encoding-init.rb 2010-09-12 12:50:44 UTC (rev 415) +++ trunk/ruby-oci8/lib/oci8/encoding-init.rb 2010-09-18 13:33:11 UTC (rev 416) @@ -65,6 +65,10 @@ if enc.nil? raise "Ruby encoding name is not found in encoding.yml for NLS_LANG #{nls_lang}." end + if enc.is_a? Array + # Use the first available encoding in the array. + enc = enc.find do |e| Encoding.find(e) rescue false; end + end end OCI8.encoding = enc end Modified: trunk/ruby-oci8/lib/oci8/encoding.yml =================================================================== --- trunk/ruby-oci8/lib/oci8/encoding.yml 2010-09-12 12:50:44 UTC (rev 415) +++ trunk/ruby-oci8/lib/oci8/encoding.yml 2010-09-18 13:33:11 UTC (rev 416) @@ -40,7 +40,7 @@ # MS Windows Code Page 950 with Hong Kong Supplementary Character # Set HKSCS-2001 (character set conversion to and from Unicode is # based on Unicode 3.0) -ZHT16HKSCS: Big5 # Does the Big5 include HKSCS? +ZHT16HKSCS: [Big5-HKSCS, Big5] # MS Windows Code Page 950 Traditional Chinese ZHT16MSWIN950: Big5 @@ -166,7 +166,7 @@ # MS Windows Code Page 950 with Hong Kong Supplementary Character # Set HKSCS-2001 (character set conversion to and from Unicode is # based on Unicode 3.1) -ZHT16HKSCS31: Big5 # Does the Big5 include HKSCS? +ZHT16HKSCS31: [Big5-HKSCS, Big5] # SOPS 32-bit Traditional Chinese ZHT32SOPS: nil # FIXME