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

204 Коммитов

Автор SHA1 Сообщение Дата
nobu a4fbd748e2 * configure.in (GCC): subst for GCC depending extension libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12 08:31:44 +00:00
nobu c754c0b237 * ext/dl/cfunc.c (dlcfunc_data_type): typed.
* ext/dl/cptr.c (dlptr_data_type): ditto.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 12:19:28 +00:00
nobu 34cf45ab19 * ext/dl/handle.c (rb_dlhandle_s_sym): added a method to access
using RTLD_NEXT.  [ruby-dev:38152]

* ext/dl/handle.c (Init_dlhandle): added constants DEFAULT and
  NEXT which correspond to RTLD_DEFAULT and RTLD_NEXT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-23 12:49:00 +00:00
nobu 96e6cfb835 * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_struct_signature):
splitting with regexp source string is obsolete.  a patch from
  Minwoo Lee at [ruby-core:23494].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-23 09:53:15 +00:00
nobu fb3fa6aa4e * ext/dl/cptr.c (rb_dlptr_cmp): return signed value, and restrict
to Fixnum.  [ruby-dev:38533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-23 09:48:54 +00:00
nobu 28e7beb54c * ext/dl/lib/dl/callback.rb (DL#remove_callback_internal): ignore
unbound function.  [ruby-dev:38474]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-16 08:57:41 +00:00
nobu ab142b7274 * ext/dl/lib/dl/func.rb (DL::Function#bound?): returns if already
bound to a block.

* ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): block must be
  given if arg is not bound.  [ruby-dev:38404]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10 02:36:13 +00:00
nobu 8812fe1a97 * ext/dl/cfunc.c (rb_dlcfunc_instance_p): new function to check if
the argument is an instance of DL::CFunc.

* ext/dl/cptr.c (rb_dlptr_initialize, rb_dlptr_s_malloc): checks
  if DL::CFunc.  [ruby-dev:38403].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10 02:13:20 +00:00
nobu 07b5520752 * ext/dl/cptr.c: consistent indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10 01:47:10 +00:00
nobu e102f89472 * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_signature): strips
spaces.  based on a patch from Takashi Tamura in [ruby-dev:38398].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-10 01:40:04 +00:00
nobu f65d706529 * ext/dl: updated svn:ignore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-21 00:51:51 +00:00
nobu 27a39b8ffe * win32/Makefile.sub (config.h): added RUBY_COREDLL.
* ext/dl/handle.c (rb_dlhandle_initialize): returns msvcrt if libc
  or RUBY_COREDLL is given.  [ruby-core:22828]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 04:48:03 +00:00
nobu f797bdae70 * ext/dl: made indent style insistent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-17 01:15:35 +00:00
nobu 02136ebbb5 * common.mk (srcs-ext): creates ext/dl/callback/callback.c also.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 23:26:11 +00:00
nobu 976c01b404 * ext/dl/handle.c (rb_dlhandle_sym): RTLD_NEXT is not for symbol
name.   [ruby-dev:38150]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 11:13:40 +00:00
usa df63af6be2 * ext/dl/win32/lib/Win32API.rb: call by :stdcall as default.
[ruby-core:22826]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 08:27:21 +00:00
nobu f5315680aa * ext/dl/handle.c (rb_dlhandle_sym): moved conditinally used variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:06:57 +00:00
nobu 7e59a8c5e4 * ext/dl/handle.c (rb_dlhandle_sym): fixed heap corruption.
[ruby-core:22822]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:03:14 +00:00
nobu 5bfb9a63b7 * ext/dl/callback/mkcallback.rb (DLTYPE[FLOAT]): cast to suppress
warnings.  [ruby-core:22792]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10 10:40:07 +00:00
nobu 53f011e662 * ext/dl/callback/depend: fix for parallel build.
* ext/dl/callback/extconf.rb: callback.h is no longer created.

* ext/dl/callback/mkcallback.rb: creates main source first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 18:48:34 +00:00
nobu d3c4a4686a * ext/dl/callback/extconf.rb ($distcleanfiles): added callback.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 16:57:17 +00:00
nobu 3b759e62ac * ext/dl/dl.c (Init_dl): protoized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-09 06:25:14 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
usa dba06de110 * ext/dl/win32/lib/win32/resolv.rb: get rid of warning.
* ext/dl/lib/dl/func.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 07:52:42 +00:00
usa 2a89c088a2 * ext/dl/win32/lib/win32/{registry,resolv}.rb: use dl/import instead
of Win32API.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:55:26 +00:00
usa 95189045d0 * ext/dl/lib/dl/func.rb (DL::Function.name): delegate to @cfunc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:54:00 +00:00
nobu 1001173ccd * ext/dl/dl.c (rb_dl_init_callbacks): autoloads callbacks.
* ext/dl/callback: split from dl.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:40:40 +00:00
nobu 91dd419efb * ext/dl/lib/dl/cparser.rb (DL::CParser::parse_signature): fixed
variable name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:09:14 +00:00
nobu daa2217d48 * ext/dl/lib/dl/pack.rb (DL::PackInfo): reduced redundant
initialization.

* ext/dl/lib/dl/stack.rb (DL::Stack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:07:24 +00:00
nobu 0cceff94ca * ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): NULL for nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:05:21 +00:00
nobu f9ca2119e4 * test/dl: moved from ext/dl/test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-03 06:03:23 +00:00
nobu 033bed37c8 * ext/dl/dl.h (dlerror): fixed on Windows.
* ext/dl/handle.c (rb_dlhandle_initialize): returns handle to
  libruby if nil is given on Windows as dlopen.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 02:01:48 +00:00
nobu 46e06b572b * ext/dl/handle.c (rb_dlhandle_sym): get rid of buffer overrun,
and try ASCII WINAPI versions too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 01:50:56 +00:00
nobu 895b3f6e06 * ext/dl/win32/lib/Win32API.rb (initialize): passes rest
arguments to DL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:52:48 +00:00
nobu 3465e37e63 * ext/dl/cfunc.c (rb_dlcfunc_call): fix for stdcall and missing
argument numbers.  [ruby-core:22601]

* ext/dl/dl.h (DLSTACK_PROTO0_): added.

* ext/dl/mkcallback.rb (gencallback, gen_callback_file),
  (rb_dl_init_callbacks): omit stdcall functions unless supported.

* lib/rubygems/config_file.rb (SHGetFolderPath): stdcall.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:02:06 +00:00
nobu 056d798ed2 * ext/dl/handle.c (rb_dlhandle_sym): moved conditionally used variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 18:17:51 +00:00
nobu 1fb7ce6303 * ext/dl/win32/lib/Win32API.rb (Win32API#initialize): DL.dlopen
raises DLError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:37:11 +00:00
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