Граф коммитов

13613 Коммитов

Автор SHA1 Сообщение Дата
akr 5f9b877ebe * transcode.c (get_replacement_character): extracted from
output_replacement_character.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:21:15 +00:00
akr c1361132bc * transcode_data.h (rb_transcoder): typedef at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:00:48 +00:00
akr 425098de96 * transcode.c (rb_trans_conv): find second last error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 21:49:38 +00:00
svn 53fddace54 * 2008-08-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 15:50:47 +00:00
akr a2901a7c75 * transcode_data.h (rb_trans_result_t): new type.
(rb_trans_elem_t): new type.
  (rb_trans_t): new type.

* transcode.c (transcode_dispatch_cb): removed.
  (transcode_dispatch): removed.
  (rb_transcoding_result_t): moved to rb_trans_result_t in
  transcode_data.h.
  (transcode_restartable0): goto follow_info when FUNsi.
  (rb_transcoding_open): use get_transcoder_entry.
  (rb_trans_open): new function.
  (rb_trans_conv): ditto.
  (rb_trans_close): ditto.
  (trans_open_i): ditto.
  (trans_sweep): ditto.
  (more_output_buffer): take rb_trans_t instead of rb_transcoding as
  an argument.
  (transcode_loop): take from_encoding and to_encoding instead of tr
  as arguments.  use rb_trans_open/rb_trans_conv/rb_trans_close.
  (str_transcode): don't use transcode_dispatch.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 15:50:42 +00:00
matz 96765d153f * iseq.c (rb_iseq_clone): should preserve cref_stack link.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:39:09 +00:00
matz 199a95775b * ext/dl/cfunc.c (rb_dlcfunc_call): add taint check.
* ext/dl/dl.c (rb_dl_malloc): add rb_secure(2).

* ext/dl/dl.c (rb_dl_realloc): ditto.

* ext/dl/dl.c (rb_dl_free): ditto.

* ext/dl/dl.c (rb_dl_ptr2value): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:33:44 +00:00
nobu 35b6abbca2 * gc.c (getrusage_time): works only if RUSAGE_SELF is defined right
now.

* gc.c (gc_profile_result): C99.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:11:27 +00:00
matz 9295fd4b59 * array.c (rb_ary_sample): rename #choice to #sample. in
addition, sample takes optional argument, a la #first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 10:00:47 +00:00
nari 130e720253 * gc.c: added GC::Profiler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 09:36:57 +00:00
kouji c5579a833d fixed ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 09:16:28 +00:00
kouji aa2a222f9c * ext/readline/README.ja: added API document for
Readline.vi_editing_mode? and Readline.emacs_editing_mode?.

* ext/readline/extconf.rb: checked rl_editing_mode variable in
  Readline library.

* ext/readline/readline.c (readline_s_emacs_editing_mode_p): added
  Readline.emacs_editing_mode? method.
  (readline_s_vi_editing_mode_p): added Readline.vi_editing_mode?
  method.
  (Init_readline): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 08:31:45 +00:00
matz e956f28724 * class.c (clone_method): should copy cbase in cref as well.
[ruby-dev:35116]

* iseq.c (iseq_mark): mark original iseq object.

* iseq.c (iseq_free): do not free internal data if they have
  original iseq to belong.

* iseq.c (rb_iseq_clone): a new function to clone iseq value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 08:13:42 +00:00
kouji 5898c07466 * test/readline/test_readline.rb: added test for Readline's class
methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 07:58:02 +00:00
akr 2897632f16 * enc/trans/iso2022.trans: renamed from iso2022.erb.c.
* enc/trans/single_byte.trans: ditto.

* enc/trans/utf_16_32.trans: ditto.

* enc/trans/korean.trans: ditto.

* enc/trans/japanese.trans: ditto.

* enc/depend: follow the renaming.

* tool/build-transcode: ditto.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 07:39:52 +00:00
akr 36dd9a2221 * configure.in (rb_cv_broken_glibc_ia64_erfc): renamed from
rb_broken_glibc_ia64_erfc.
  [ruby-core:18228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 06:11:55 +00:00
svn cc0114b6d0 * 2008-08-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 01:06:25 +00:00
akr bd5bf3726c * transcode_data.h (rb_transcoding): rename fields.
readlen -> recognized_len.
  feedlen -> readagain_len.

* transcode.c: follow the field renaming.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 01:06:21 +00:00
akr badd9f1efc * transcode.c (transcode_restartable0): invalid handling simplified.
(transcode_restartable): use PARTIAL_INPUT for converting buffered
  input.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 13:37:44 +00:00
mame 4d763fb8ee * encoding.c: include util.h. [ruby-dev:35715]
* common.mk: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 13:25:34 +00:00
akr 436a136b4e * transcode_data.h (rb_transcoding): new field: flags.
* transcode.c (load_transcoder): extracted from transcode_dispatch_cb.
  (rb_transcoding_result_t): renamed from transcode_result_t.
  (rb_transcoding_open): new function.
  (rb_transcoding_convert): ditto.
  (rb_transcoding_close): ditto.
  (transcode_loop): use rb_transcoding_open, rb_transcoding_convert
  and rb_transcoding_close.
  (str_transcode): don't need rb_transcoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 12:26:01 +00:00
akr 30e90a335d * tool/transcode-tblgen.rb: record checksum of
transcode-tblgen.rb itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 09:10:58 +00:00
nobu aa9457762f * config.guess ({powerpc-apple,i586-pc}-haiku): re-applied r18403.
[ruby-core:18110]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:34:44 +00:00
nobu 2be9ae2f13 * config.{guess,sub}: updated to automake-1.10.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:29:21 +00:00
nobu de0a9f726e * configure.in,parse.y: removed garbage spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:15:37 +00:00
nobu e3d9fc76e6 * enc/Makefile.in (make-workdir): use MAKEDIRS.
* enc/depend: makes target directory before compile/link.

* tool/transcode-tblgen.rb: creates target directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:45:18 +00:00
akr 2ce7aeca6e * transcode.c: rename my_transcoding to tc and my_transcoder to tr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:33:05 +00:00
akr e748ed513d * transcode_data.h (rb_transcoding): add feedlen field.
* transcode.c (transcode_restartable0): renamed from
  transcode_restartable.
  save input buffer into feed buffer if next character is started the
  point before input buffer.  for example, "\x00\xd8\x01" then "\x02"
  in UTF-16LE.  \x02 causes invalid and next character is started from
  \x01.
  (transcode_restartable): new function to call
  transcode_restartable0.   if feed buffer is not empty, convert it at
  first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:17:56 +00:00
nobu 3ba7984ef4 * common.mk (extconf): use MAKEDIRS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:03:01 +00:00
nobu 50c241002a * lib/irb.rb (IRB::Irb#inspect): instance_variables returns symbols
instead of strings now.   [ruby-dev:34930]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 00:35:14 +00:00
akr b2718506ad * transcode.c (transcode_char_start): refactored to remove readlen
argument.
  (transcode_restartable): refactored to remove readlen variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 00:23:36 +00:00
nobu bdcb8fd07e * gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t.
[ruby-core:18207]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 23:56:17 +00:00
akr 94dc1e0b4a r18455 reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 23:33:37 +00:00
svn 1bca9ada54 * 2008-08-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 23:15:14 +00:00
nobu a64266a728 * configure.in (rb_cv_missing__dtos18, rb_cv_missing_fconvert),
ext/digest/md5/md5.c, ext/openssl/ossl.c (main),
  ext/socket/extconf.rb (ipv6, wide-getaddrinfo): main should be int.

* main.c (main), win32/winmain.c, wince/wincemain.c (WinMain): envp is
  no longer used so long time.  based on a patch from Peter Bowen at
  [ruby-core:18208]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 23:15:08 +00:00
akr 0e3d10173b * transcode.c (transcode_loop): take destination and resize function
as parameters.
  (more_output_buffer): ditto.
  (str_transcoding_resize): argument changed from rb_transcoding* to
  VALUE.
  (str_transcode): call transcode_loop with destination string and its
  resize function.

* transcode_data.h (rb_transcoding): move ruby_string_dest and
  flush_func to transcode_loop parameters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 13:34:21 +00:00
naruse a596f3a7e6 * common.mk: encs depend on transdb.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 12:41:50 +00:00
nobu cf7ad7e057 * configure.in (rb_cv_rshift_sign, rb_cv_binary_elf): get rid of
AC_TRY_RUN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 12:10:54 +00:00
akr b9d3995310 * transcode.c (transcode_char_start): arguments changed.
(transcode_restartable): arguments changed to avoid *in_pos points
  out of buffer by decreasing *in_pos.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 10:32:02 +00:00
akr 4bceda1125 * transcode_data.h (rb_transcoding): new fields: next_info and next_byte.
* transcode.c (transcode_restartable): save/restore next_info and
  next_byte.
  sync readlen and in_p when invalid.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 07:35:28 +00:00
akr ca3dd2d89e * transcode.c (transcode_restartable): my_transcoder argument removed.
(transcode_loop): my_transcoder argument removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 06:25:05 +00:00
akr 139234e1a0 * transcode_data.h (rb_transcoding): add fields for restartable
transcoding.
  (rb_transcoder): add max_input field.
  from_unit_length field is renamed to input_unit_length.

* tool/transcode-tblgen.rb: generate max_input field.

* enc/trans/iso2022.erb.c: follow rb_transcoder change.

* enc/trans/utf_16_32.erb.c: ditto.

* transcode.c (PARTIAL_INPUT): new constant.
  (transcode_char_start): new function.
  (transcode_result_t): new type.
  (transcode_restartable): new function.
  (more_output_buffer): new function.
  (transcode_loop): use transcode_restartable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 06:02:01 +00:00
nobu 750cb61e65 * stable/ext/socket/socket.c (NI_MAXHOST, NI_MAXSERV): fixed invalid
preprocessor directives.  a patch from Peter Bowen at
  [ruby-core:18211].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 04:35:13 +00:00
nobu 1727355a22 * enc/make_encdb.rb, enc/trans/make_transdb.rb: skip nonexistent
directory.  [ruby-dev:35802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 21:37:43 +00:00
akr 94342f89f9 add several tests for UTF-32LE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 16:12:03 +00:00
akr 6db9e77e64 * enc/trans/utf_16_32.erb.c (fun_so_from_utf_32le): implemented.
(fun_so_to_utf_32le): implemented.
  [ruby-dev:35777]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 16:08:50 +00:00
svn fbe9c1026d * 2008-08-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 15:48:22 +00:00
akr 2833d9f95d * transcode_data.h (rb_transcoder): from_unit_length field added.
from_utf8 field removed.

* tool/transcode-tblgen.rb: generate offsets range.
  follow rb_transcoder change.

* transcode.c (transcode_loop): don't use from_utf8.
  make invalid region from_unit_length wise.

* enc/trans/iso2022.erb.c: follow rb_transcoder and 
  transcode_generate_node change.

* enc/trans/utf_16_32.erb.c: follow rb_transcoder and
  transcode_generate_node change.
  explicit :invalid map removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 15:48:17 +00:00
nobu a456f022fc * enc/depend (TRANSCSRCS): needs rule_subst to apply.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 14:30:05 +00:00
nobu 90ca8317d3 * io.c (shutdown): not define if defined already.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 14:27:25 +00:00