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

267 Коммитов

Автор SHA1 Сообщение Дата
ko1 6961f8becc * ext/dl/test/test_import.rb: fix a prototype decl.
pointed out by Takehiro Kubo [ruby-core:20971].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-30 08:05:06 +00:00
ko1 d0ed5a9378 * ext/dl/test/test_base.rb: add libc search logic.
this patch is written by Takehiro Kubo.
  [ruby-core:20963] [Bug #932]
* ext/dl/dl.h: Add ",..." as the last argument.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/lib/dl/stack.rb: add add_padding() to calculate
  alignment.  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/test/test_func.rb: atof()'s return value is double.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]
* ext/dl/test/test_import.rb:
  - atof()'s return value is double.
  - The types of qsort's second and third argument are size_t.
  - fprintf()'s return value is int.
  this patch is written by Takehiro Kubo.
  Bug #633 [ruby-core:19289]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 14:54:24 +00:00
yugui db86fef72f * ext/dl/test/test_base.rb: add x86_64-linux's case again. #932
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 12:39:31 +00:00
naruse 6e658ea392 * test/ext/dl/test_base.rb : add BSD's case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:42:39 +00:00
yugui f6cc65ae48 * ext/dl/lib/dl/import.rb (DL::Importer#sizeof): follows
a feature change in 1.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:13:32 +00:00
yugui 28001c849d * ext/dl/lib/dl/import.rb (DL::Importer#extern): adds filename and
line number to module_eval'ing for readability of backtrace.
  (DL::Importer#bind): ditto.

* ext/dl/lib/dl/struct.rb (DL::CStructBuilder#create): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 12:13:24 +00:00
takano32 0781d24aaa Sun Dec 28 17:10:13 2008 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* ext/dl/test/test_dl2.rb: modify strncpy, strcpy, qsort, types.
	  Bug #633 [ruby-core:19289]
	* ext/dl/test/test_base.rb: /lib/libc.so is x86_64 binary in x86_64 architecture.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 08:10:20 +00:00
takano32 04b672f34b * ext/dl/test/test_base.rb: use libc.dylib when the platform is darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 03:58:02 +00:00
takano32 f0f281c1c1 * ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 12:48:20 +00:00
yugui 3ac20b9590 * ext/dl/extconf.rb ($distcleanfiles): added callback-?.c into
the distclean list.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-03 15:49:39 +00:00
akr 91e5f7d51a * ext/dl/mkcallback.rb (rb_dl_init_callbacks): fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 03:56:30 +00:00
akr 3deee712f5 * ext/dl/mkcallback.rb: split callback.h to callback-[0-9].c to reduce
memory consumption on compilation.  [ruby-dev:31898]

* ext/dl/depend: add dependency for callback-[0-9].[co].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 16:55:34 +00:00
akr f69c1c5eda * ext/dl/mkcallback.rb (foreach_proc_entry): extracted.
(gencallback): ditto.
  (gen_push_proc_ary): ditto.
  (gen_push_addr_ary): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 16:29:03 +00:00
akr 8eb12fc30e * ext/dl/test/test_import.rb: fix character code.
* ext/dl/test/test_func.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 14:39:21 +00:00
akr 86e45042cb * ext/dl/mkcallback.rb: fix continuation line detection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 05:48:09 +00:00
akr 375dbe3c73 * ext/dl/mkcallback.rb (rb_dl_init_callbacks): avoid GC problem which
is caused by 'GC.stress=true; require "dl"'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 05:42:06 +00:00
nobu 3c1fca24e2 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:15:18 +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 29b538fa71 * lib/resolv.rb (Resolv::Config.default_config_hash): requires
win32/resolv to use Win32::Resolv.  [ruby-dev:34138]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-31 16:55:54 +00:00
nobu 439089327a * lib/resolv.rb (Resolv::Hosts): should not use win32/resolv on cygwin.
[ruby-dev:29945], [ruby-dev:34095]

* lib/win32/registry.rb (Win32::Registry.expand_environ): try upcased
  name too for cygwin.  [ruby-dev:29945]

* lib/win32/resolv.rb (Win32::Resolv.get_hosts_path): use expand_path.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-21 12:27:00 +00:00
usa 47aa40cd55 * ext/dl/depend: add dependencies. [ruby-dev:32760]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25 07:35:47 +00:00
usa 2364c5e6e7 * dl/win32/lib/win32/sspi.rb: use pack/unpack("m") instead of base64
library which was already removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 13:12:56 +00:00
usa 97a9e9da85 * ext/Win32API/*: removed or moved to ext/dl/win32.
* ext/dl/win32/*: new. [ruby-dev:32387]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-03 02:53:13 +00:00
ko1 25c0cb981a * include/ruby/ruby.h: introduce 2 macros:
RFLOAT_VALUE(v), DOUBLE2NUM(dbl).
  Rename RFloat#value -> RFloat#double_value.
  Do not touch RFloat#double_value directly.
* bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c,
  pack.c, parse.y, process.c, random.c, sprintf.c, string.c,
  time.c: apply above changes.
* ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13 16:00:53 +00:00
matz 7db17c6ad6 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): no longer check
HAVE_RB_IO_STDIO_FILE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-08 10:20:08 +00:00
matz 4b3644bef7 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fptr->f was renamed to fd. a
report from Yusuf Celik <ycelik AT oytek.com.tr>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-08 10:00:06 +00:00
nobu cba32dcaa6 * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222]
* ext/digest/digest.c (rb_digest_instance_update,
  rb_digest_instance_finish, rb_digest_instance_reset,
  rb_digest_instance_block_length): %s in rb_raise() expects char*.
  [ruby-dev:31222]

* ext/openssl/ossl.h: include ossl_pkcs5.h.  [ruby-dev:31231]

* ext/openssl/ossl_pkcs5.h: new file for PKCS5.  [ruby-dev:31231]

* ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise()
  instead of rb_raise().  [ruby-dev:31222]

* ext/sdbm/_sdbm.c: DOSISH platforms need io.h.  [ruby-dev:31232]

* ext/syck/syck.h: include stdlib.h for malloc() and free().
  [ruby-dev:31232]

* ext/syck/syck.h (syck_parser_set_input_type): prototype added.
  [ruby-dev:31231]

* win32/win32.c: include mbstring.h for _mbspbrk().  [ruby-dev:31232]

* include/ruby/win32.h (rb_w32_getcwd): prototype added.
  [ruby-dev:31232]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15 13:24:39 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
nobu 5b10c170e5 * file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):
renamed from OpenFile.

* ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h,
  ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c,
  ext/readline/readline.c, ext/socket/socket.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 10:30:50 +00:00
ko1 a3e1b1ce7e * Merge YARV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 15:02:22 +00:00
matz 41f3f0eb66 * parse.y (parser_warning, parser_warn): some error message may
contain format specifiers.  a patch from Akinori MUSHA <knu at
  iDaemons.org>.  [ruby-dev:29657]

* regparse.c (onig_rb_warning, onig_rb_warn): ditto.

* ext/bigdecimal/bigdecimal.c (VpException): ditto.

* ext/dl/handle.c (rb_dlhandle_initialize): ditto.

* ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-14 14:33:10 +00:00
matz 2156870525 * ruby.h (struct RArray): embed small arrays.
(RARRAY_LEN): defined for accessing array members.
  (RARRAY_PTR): ditto.

* array.c: use RARRAY_LEN and RARRAY_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:42:08 +00:00
usa 974037a542 * eval.c (search_required): use RSTRING_PTR and RSTRING_STR.
* object.c (nil_plus): ditto.

* ext/dl/cptr.c (rb_dlptr_s_to_ptr): ditto.

* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 12:10:08 +00:00
ttate a5b2d039d1 should define FUNC_CDECL/STDCALL if the macros are not defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-07 14:19:41 +00:00
ttate d01f22ec7c conformed to the usage of FUNC_CDECL/STDCALL described in [ruby-dev:28970].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-06 19:59:31 +00:00
matz 1564ed2f0a * bignum.c: ruby 1.9 HEAD 64 bit warnings clean up from
<ville.mattila at stonesoft.com>.   [ruby-core:08120]

* ChangeLog: remove some direct reference to mail addresses
  to prevent spams.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-03 20:07:10 +00:00
ttate e587cf2730 fixed the alignment problems discussed in [ruby-dev:28667].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-30 18:05:40 +00:00
akr 934847fbeb add extconf.h to .cvsignore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-24 01:15:08 +00:00
aamine 469f1f7b49 * ext/dl/.cvsignore: ignore callback.h.
* ext/ripper/.cvsignore: ignore eventids2table.c.
* ext/socket/.cvsignore: ignore constants.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-03 05:41:53 +00:00
akr 04946de81b * mkconfig.rb: generate RbConfig instead of Config.
* instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub,
  ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb,
  lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb,
  lib/webrick/httpservlet/cgihandler.rb,
  test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb,
  test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb,
  test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb,
  win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of
  Config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20 08:34:53 +00:00
ttate 6ddd56a130 should compare SIZEOF_VOIDP with SIZEOF_LONG_LONG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-08 13:50:38 +00:00
usa 404faedbaa * sorry, commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18 02:03:50 +00:00
usa 0245c7aa16 * ext/dl/depend, ext/dl/extconf.rb, ext/socket/depend,
ext/socket/extconf.rb: shouldn't define DESTCLEANFILES in depend,
  use $distcleanfiles in extconf.rb.

* win32/Makefile.sub (distclean-local): should remove .config.h.time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-18 02:01:24 +00:00
akr fc1bdda026 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): abolish sizeof(FILE).
[ruby-dev:27317]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-29 01:28:56 +00:00
akr 0517b43c5b banish some warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 00:17:43 +00:00
ttate c2e1ef22b9 if dlload fail to load a library, it should raise an error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-08 14:38:02 +00:00
ttate a7c5e6bcec Added DL::BUILD_RUBY_PLATFORM,BUILD_RUBY_VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-14 20:59:07 +00:00
ttate e2a0e0faae added a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-09 14:43:50 +00:00
ttate 597a64146f replaced the local variable 'entity' with an instance variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-09 14:38:44 +00:00
ttate 4187afceca use DL::CStructBuilder instead of CStructBuilder.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-08 18:56:23 +00:00
nobu dd5e79bace * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-30 13:00:16 +00:00
ttate d7ff980375 CUnionEntity should inherit CStructEntity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-10 23:05:52 +00:00
ttate 6080121d55 changed the spec of CPtr#[]/[]= to suit String#[]/[]=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-08 11:31:20 +00:00
ttate 215cd35df9 minor bugfix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-08 10:50:23 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
ttate 8c5bd041b6 modified some test scripts for [ruby-dev:25661].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-09 09:42:40 +00:00
ttate c1f29da23d added bcc32 support [ruby-dev:25657] and fixed a minor bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-08 09:18:16 +00:00
ttate 3977dbc576 Use define_method instead of module_eval.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07 23:08:26 +00:00
ttate f605a6fcb7 minor bugfix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07 12:13:46 +00:00
ttate 7bcc135504 Improved DL::Handle#sym.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-07 09:45:02 +00:00
ttate dca41072d3 Added VC++ support thanks to U.Nakamura's patch. [ruby-dev:25644]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06 18:07:10 +00:00
ttate 93711e5bd3 added DL::Importer.sizeof().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06 06:54:12 +00:00
akr a9639c22ef * ext/dl/dl.c (Init_dl): function declaration should precede
statements before C99.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06 02:32:40 +00:00
ttate 41cd3d868d added missing files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-04 14:01:22 +00:00
ttate bda37095ca added new files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-04 13:35:37 +00:00
ttate 4ae9132605 remove all files to replace ruby-dl with ruby-dl2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-04 13:29:49 +00:00
ttate e849cce8a0 bugfix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-03 14:38:31 +00:00
nobu bf48e22869 * ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after
all argument conversion.  fixed: [ruby-dev:25271]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21 23:35:11 +00:00
ttate ba2fce1507 devided DL::Types#encode_type into three methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-14 12:42:42 +00:00
akr 78f7b7036b * rubyio.h, io.c, ext/dl/dl.c, ext/pty/pty.c, ext/socket/socket.c:
create FILE object only when required: popen(3) and DL's IO#to_ptr.
  [ruby-dev:25122]

* io.c (rb_io_binmode): use setmode for Human68k.  [ruby-dev:25121]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 13:26:27 +00:00
ttate f7884c6beb bugfix for [ruby-talk:121309].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 08:39:31 +00:00
ttate f7a5ee56d7 Use 'P' instead of 'p' in types.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 08:15:29 +00:00
ttate 733a3adc79 improved encode_type() in types.rb for [ruby-talk:121175].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-24 16:38:38 +00:00
eban 49fb289ea1 * MANIFEST, ext/**/MANIFEST: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 10:13:52 +00:00
ttate 0748ee8b90 Use NUM2INT to convert short values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-23 06:05:15 +00:00
ttate f427cf9352 should use 'c' for 'unsigned char ref'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21 12:47:48 +00:00
ttate 2ce5bb2594 added 'const char *' to use the type specifier 'S' instead of 'char *'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-16 15:22:20 +00:00
ttate 1ebcad550f bugfix for Importable.callback().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-20 18:22:03 +00:00
ttate c863d62b6f Merged Nakada-san's patch [ruby-core:02916].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-23 08:11:36 +00:00
nobu faab8f264d * configure.in (ieeefp.h), numeric.c: needed for finite() on
Solaris.  [ruby-core:01921]

* file.c (rb_stat_inspect): adjust format specifier.

* parse.c (arg_prepend): nodetype() is for debug use.

* ruby.h (ISASCII, etc): cast to int to get rid of warning.

* ruby.h (alloca.h): include even in GCC.  [ruby-core:01925]

* ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format
  specifier.

* ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce,
  BigDecimal_divmod): use rb_assoc_new() to suppress memory usage.

* ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto.

* ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be
  volatile.

* ext/iconv/iconv.c (iconv_convert): ensure actual parameter with
  format specifier.

* ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not
  define unless used.

* ext/pty/pty.c (getDevice): get rid of warning.

* ext/socket/socket.c (port_str, sock_s_getaddrinfo,
  sock_s_getnameinfo): FIX2INT() now returns long.

* ext/socket/socket.c (init_inetsock_internal): uninitialized
  variable.

* ext/syck/rubyext.c (syck_parser_assign_io): add prototype.

* ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use
  ISDIGIT() instead of isdigit() to avoid warnings and for
  platforms which don't support non-ascii charater.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 02:39:59 +00:00
usa 4eaf7b1186 * ext/dl/sym.c (rb_dlsym_guardcall): __declspec(noinline) is VC7
feature.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-04 01:45:07 +00:00
ttate a41f5816dd Merged Tietew's patch of [ruby-dev:21991].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01 23:02:44 +00:00
ttate 7924fca23e Merge the patch of [ruby-ext:02242]. (Thanks, Masahiro Sakai)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-13 11:46:31 +00:00
ttate c103eb6793 Bugfix for DL::Types::encode_type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-08 14:38:15 +00:00
eban 84c2c9ac5b * ext/dl/sym.c: typo fix(lasterror -> last_error).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-08 13:32:07 +00:00
ttate 0f8d55fa98 Add DL.win32_last_error and DL.last_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-08 04:48:35 +00:00
nobu d74e7e6837 * eval.c (ruby_cleanup): initialize stack bottom for embedding.
[ruby-dev:21686]

* ext/dl/extconf.rb: move list of files to clean from DEPEND file,
  to get rid of macro redefinitions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-23 08:59:42 +00:00
ttate 618a435178 --enable-dlstack is true in default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-22 15:04:35 +00:00
ttate 79c3e2d004 Bugfix for PR#1196
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-22 14:29:20 +00:00
matz 8ef5da3be1 consistent parentheses in assignment RHS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-16 17:47:19 +00:00
usa 51e7fc687e * ext/dl/dl.c (rb_dl_callback): use rb_block_proc() instead of
rb_block_new().

	* ext/win32ole/win32ole.c (ev_on_event): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16 07:25:38 +00:00
matz bad7546f15 * gc.c (define_final): eliminate rb_f_lambda() call.
* class.c (rb_scan_args): ditto.

* signal.c (sig_trap): ditto.

* hash.c (rb_hash_initialize): ditto.

* variable.c (rb_f_trace_var): ditto.

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

* ext/win32ole/win32ole.c (ev_on_event): ditto.

* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.
  Each END proc should preserve its own $SAFE level. [ruby-core:01119]

* marshal.c (marshal_load): remove unused variable "hash".
  [ruby-core:01120]

* hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860]

* array.c (rb_ary_first): optional argument to retrieve first n
  elements.

* array.c (rb_ary_last): optional argument to retrieve last n
  elements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-06 09:44:22 +00:00
matz fec60bc7c4 * eval.c (avalue_to_svalue): use rb_check_array_type() again.
Clarify how "to_ary" and "to_a" work. [ruby-talk:68155]

* eval.c (svalue_to_avalue): ditto.

* eval.c (svalue_to_mrhs): ditto.

* eval.c (rb_eval): unary splat to use to_a, but we need a hack to
  exclude Object#to_a until it's removed.

* object.c (rb_Array): check obj.respond_to?("to_a").  Currently
  all object respond_to "to_a", but Object#to_a will be removed.

* range.c (Init_Range): undefine to_ary.

* re.c (Init_Regexp): ditto.

* regex.c (re_compile_pattern): do not warn if "-" is at the top
  or last of character class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 02:56:18 +00:00
matz ece972717b security enhancement of dl library (need test).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24 09:38:37 +00:00
ttate ab7dac4027 Added rb_secure(4). (Thanks to Minero Aoki)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-24 07:56:37 +00:00
knu 196583d6eb * ext/dl/MANIFEST: Exclude .cvsignore. [found by: eban]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-03 16:20:45 +00:00
eban 4a464c1fa2 * typo fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-20 10:22:04 +00:00
michal 4e13d36561 -Wall cleanups (removed unused vars, no 'code has no effect' warnings)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16 07:38:40 +00:00
eban ada8110f7f * ext/dl/lib/dl/win32.rb: elimitate unnecessary "A" adding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-12 17:36:24 +00:00
ttate 0af783bef4 Check the return value of dlopen().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-12 13:11:32 +00:00
ttate 81dded0d17 Correct the description about type specifiers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-11 17:28:59 +00:00
eban 3074716cad * ext/dl/lib/dl/win32.rb: compatibility improvement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-11 15:00:56 +00:00
knu 8eba058079 * intern.h (rb_check_array_type): Declare rb_check_array_type().
* ext/digest/md5/md5ossl.c: Include stdio.h for sprintf() and
  string.h for memcmp().

* ext/dl/ptr.c: Include ctype.h for isdigit().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06 11:47:53 +00:00
nobu 3780ede6ef * ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c,
  ext/stringio/stringio.c, ext/strscan/strscan.c,
  ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c:
  use rb_define_alloc_func().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 11:23:40 +00:00
ttate f51bd1d018 Fix the conversion method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-09 04:08:22 +00:00
ttate dc260404fe dlsizeof() should handle 'S' and 's'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-26 10:53:11 +00:00
ttate 8e3721dfa8 Get rid of ineffective symbols, lines, constants and so on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 16:42:07 +00:00
ttate 3a86596df1 fixed rb_ary2cary() to convert nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-05 13:11:29 +00:00
ttate 5918d2a914 Bugfix for Importable::callback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-31 08:37:16 +00:00
nobu e7ce523bb1 * configure.in (XCFLAGS): CFLAGS to comile ruby itself.
* configure.in (LIBEXT): suffix for static libraries.

* configure.in (LIBPATHFLAG): switch template to specify library
  path.

* configure.in (LINK_SO): command to link shared objects.

* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
  files.

* configure.in (EXPORT_PREFIX): prefix to exported symbols on
  Windows.

* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
  libraries, macros and headers used in common.

* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
  excutable name.

* Makefile.in (CFLAGS): append XCFLAGS.

* Makefile.in (PREP): miscellaneous system dependent files.

* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.

* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.

* Makefile.in (MAKEFILES): depend on *.in and config.status.

* Makefile.in (parse.c): replace "y.tab.c" with actual name for
  byacc.

* ext/extmk.rb, lib/mkmf.rb: integrated.

* ext/extmk.rb: propagate MFLAGS.

* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
  Makefile is made.

* lib/mkmf.rb (older): accept multiple file names and Time
  objects.

* lib/mkmf.rb (xsystem): split and qoute.

* lib/mkmf.rb (cpp_include): make include directives.

* lib/mkmf.rb (try_func): try wheather specified function is
  available.

* lib/mkmf.rb (install_files): default to site-install.

* lib/mkmf.rb (checking_for): added.

* lib/mkmf.rb (find_executable0): just find executable file with
  no message.

* lib/mkmf.rb (create_header): output header file is variable.

* lib/mkmf.rb (create_makefile): separate sections.

* lib/mkmf.rb (init_mkmf): initialize global variables.

* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.

* bcc32/Makefile.sub (ARCH): fixed to i386.

* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
  link EXTOBJS.

* ext/dl/extconf.rb: use try_cpp to cross compile.

* ext/dl/extconf.rb: not modify files in source directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-21 14:03:46 +00:00
ttate 840f8bcb9e Fixed error messages and descriptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-07 01:09:50 +00:00
ttate 0c767620cd Improve the description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 14:28:40 +00:00
eban 4f26f3b890 * configure.in: modify program_prefix only if specified
--program-prefix.

* configure.in: don't generate ext/extmk.rb.

* Makefile.in: execute directly $(srcdir)/ext/extmk.rb.
  remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb.

* {win32,bccwin32}/Makefile.sub: ditto.

* instruby.rb: ditto.

* ext/extmk.rb: renamed from ext/extmk.rb.in.

* lib/mkmf.rb (module Logging): create log files (mkmf.log)
  in each extension module directories.

* ext/extmk.rb: ditto.

* lib/mkmf.rb (macro_defined?): new method.

* ext/.cvsignore: remove extmk.rb.

* ext/*/.cvsignore: add "*.def".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08 09:08:15 +00:00
ttate ee9f1463df Merged Nakada's patch [ruby-dev:18097].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29 13:00:22 +00:00
ttate 9dab5bc3b0 Multiple call of the initialize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-05 01:24:13 +00:00
ttate 45a08a4296 Conform to the allocation framework.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-04 13:49:13 +00:00
ttate 2a31a00fd9 Get rid of "return".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-30 22:55:51 +00:00
matz be1d2c5f68 * string.c (rb_str_slice_bang): if there's no corresponding
substring, slice! should return nil without exception.

* array.c (rb_ary_insert): type fixed.

* string.c (rb_str_split_m): accept separator value nil as well.

* string.c (rb_str_become): was leaking memory.

* class.c (rb_include_module): should not alter other
  classes/modules by inclusion.  by this fix, local order may not
  be preserved for some cases.

* class.c (include_class_new): module may be T_ICLASS; retrieve
  original module information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11 08:22:18 +00:00
ttate 98007267bc Add Importable::symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-27 15:09:47 +00:00
nobu 33061b45b4 * eval.c (rb_eval): NODE_EVSTR is no longer used.
* eval.c (eval): not enforce to make assigned variables dynamic.

* parse.y (string): split rules to strings/xstring/regexp to allow
  arbitrary statements inside string interpolation.

* parse.y (here_document): splitted into three phases.

* parse.y (literall_append, literal_concat): added.
  append/concatinate string literals.

* sample/test.rb (valid_syntax): adjust line number for BEGIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24 07:20:42 +00:00
ttate 28b8274e51 Include ctype.h for isdigit().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 14:59:43 +00:00
ttate 2690939122 Check the length of proto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 14:54:51 +00:00
ttate 5434d73ef7 Get rid of STR2CSTR. (Thanks N.Nakada)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 14:44:53 +00:00
ttate 176542da7f bugfix. (Thanks U.Nakamura)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 11:16:56 +00:00
H_Konishi d0b3651906 new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 01:27:48 +00:00
ttate ceade7b926 bugfix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10 18:23:39 +00:00
ttate 5c1bdda10c Add DL::Importable::Internal::callback().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10 17:47:48 +00:00
ttate abca067fb6 dl.c (rb_dl_scan_callback_args): memcpy() -> cast and substitution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10 07:52:10 +00:00
ttate 48bd82e993 Get rid of rb_dl_set_callback() and rb_dl_get_callback().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09 17:56:34 +00:00
ttate 2d5b7f7365 * ext/dl: change the callback mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09 17:47:34 +00:00
ttate 15ac468a24 Get rid of a function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 15:50:28 +00:00
ttate 77aad8b2f3 Get rid of a few functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 15:47:59 +00:00
ttate 4bf76b4e6c rename PtrData::alloc and Struct#alloc to malloc respectively.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 15:35:48 +00:00
ttate a2db8e72c1 Get rid of the declaration of rb_str_cat2().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 09:38:23 +00:00
ttate 849fb05bb1 Add DL::DLSTACK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-15 06:23:05 +00:00
ttate 88cc3b3954 cast to long from char, short and int in ASM_PUSH_XXXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-12 19:54:10 +00:00
ttate be122d47be * ext/dl: enable dl's stack emulation for constructing function call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-11 23:30:40 +00:00
ttate 22b07f5488 enable dl's stack emulation for constructing function call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-11 23:13:34 +00:00
ttate b5a8ba178f Catch the exception SystemExit in extconf.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-01 15:21:34 +00:00
ttate ca55fe4f0d L641: rb_float_new(*((float*)ptr)) -> rb_float_new(*((double*)ptr)).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-01 04:13:28 +00:00
ttate 076a82105a ext/dl/ptr.c: missing break in switch statements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-26 07:03:32 +00:00
ttate 73331b45e0 Add a sample which shows how to deal with C++ libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-20 16:09:44 +00:00
ttate 75ebf39107 ext/dl/ptr.c: remove rb_dlptr_cast().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-19 04:05:54 +00:00
ttate cb944528b6 Correct.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-14 17:19:44 +00:00
ttate 66484faf1b Edit the documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-14 15:21:23 +00:00
ttate 3a202ff2b4 raise() -> rb_raise(). (Thanks Tetsuya Watanabe)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 09:38:26 +00:00
ttate 3bd7404423 Add DL::Importable::Internal::Struct#alloc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 08:07:01 +00:00
ttate 2990a00153 Add dl.txt instead of README.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 07:09:33 +00:00
ttate 27a30bbf18 remove README and README.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 06:55:12 +00:00
ttate 96d0ef6670 Support "unsigned short".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 06:35:48 +00:00