summaryrefslogtreecommitdiff
path: root/ext/fiddle
AgeCommit message (Collapse)Author
2015-11-05ext: use RARRAY_AREFnobu
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04ext: use RARRAY_CONST_PTRnobu
* ext/bigdecimal/bigdecimal.c: use RARRAY_CONST_PTR just fore reference instead of RARRAY_PTR, to keep the array WB-protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04ext: adjust index typenobu
* ext: use long for index instead of int and RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-25use rb_check_arity [ci skip]nobu
* ext: use rb_check_arity and rb_error_arity to raise ArgumentError. [Feature #9025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19ext/fiddle/closure.c (callback): static functionnormal
The `callback' function is not used outside of closure.c and should not be able to cause namespace conflicts in compilers without visibility pragmas. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29fiddle: $LOCAL_LIBS needs to be expandednobu
* ext/fiddle/extconf.rb: revert part of r51401 and expand $LOCAL_LIBS as it will be extracted and copied to exts.mk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27fiddle: clean dot dirnobu
* ext/fiddle/depend (distclean-libffi): clean dot directory too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27fiddle: unexpand LIBFFI_DIRnobu
* ext/fiddle/extconf.rb: use LIBFFI_DIR instead of expanding it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18* include/ruby/ruby.h: $SAFE=2 is now obsolete.hsbt
* dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c gc.c, io.c, process.c, safe.c, signal.c, win32/file.c: removed code for $SAFE=2 * test/erb/test_erb.rb, test/fiddle/test_handle.rb test/ruby/test_env.rb: removed tests for $SAFE=2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* ext/fiddle/depend: Fix "Wrong mix of special targets" error withakr
OpenBSD make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13libff: fix enable-shared conditionnobu
* ext/fiddle/extconf.rb: needs --enable-shared when linked to libruby or fiddle.so. since --with-static-linked-ext does no longer link extensions to ruby program with --enable-shared, the only combination needs --enable-static is --disable-shared and --with-static-linked-ext. [ruby-dev:48901] [Bug #10960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-24libffi: workaround of VC12 mlnobu
* ext/fiddle/win32/libffi.mk.tmpl: assemble without directory prefix. workaround of a bug of VC12 ml, by unak at [ruby-core:67792]. [ruby-core:67789] [Bug #10780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17fiddle: --disable-bundled-libffinobu
* ext/fiddle/extconf.rb: disable bundled libffi if explicitly disabled by --disable-bundled-libffi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11fiddle: check assemblernobu
* ext/fiddle/extconf.rb: requires assembler for src/win{32,64}.S. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11fiddle: fix for old VCnobu
* ext/fiddle/win32/libffi-3.2.1-mswin.patch (include/ffi.h.in): old version VCs did not support long long, use __int64 instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03cparser.rb: limit word numbernobu
* ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word number as the rest are not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03* ext/fiddle/lib/fiddle/cparser.rb: r49110 brake Fiddle::Import withhsbt
type_alias * test/fiddle/test_cparser.rb: added type_alias test for parse_ctype and parse_struct_signature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03* ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParserhsbt
to handle rich signatures including parameter names and function pointer types. Patch by @theryan [fix GH-590] * test/fiddle/test_cparser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30fiddle: append libffi config.lognobu
* ext/fiddle/extconf.rb: copy config.log of libffi when failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25libffi.mk.tmpl: fix STATICLIBnobu
* ext/fiddle/win32/libffi.mk.tmpl (STATICLIB): fix static library name. [ruby-core:67128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25extconf.rb: libffi PIC objectsnobu
* ext/fiddle/extconf.rb: make PIC objects if it will be linked as a shared object eventually. [ruby-core:67128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25* ext/fiddle/win32/libffi-3.2.1-mswin.patch: support mswin32.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24fiddle: depend rulesnobu
* ext/fiddle/depend: mark PHONY targets, and workaround of unexpected DEPEND_RULES on mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24fiddle: win32/libffi-config.rbnobu
* ext/fiddle/win32/libffi-config.rb: generate necessary files to build on mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24* ext/fiddle/extconf.rb: remove ffitarget.h generated by configure onusa
mswin, because it's not normal file (cygwin's symlink) and have system attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23fiddle: extlibsnobu
* ext/fiddle/extlibs: libffi-3.2.1 and patch for mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: no empty CPPnobu
* ext/fiddle/extconf.rb: pass CPP only if necessary, should not make it empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extmk.rb: replace current directory namenobu
* ext/extmk.rb (extmake): replace "./" at beginning in LOCAL_LIBS with the current directory name for values cached in previous Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23fiddle: use RMALLnobu
* ext/fiddle/depend (realclean-libffi): use RMALL instead of RMDIRS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23fiddle: clean-libffinobu
* ext/fiddle/depend (clean-libffi): clean libffi directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: try modversion ff pkg_config succeedednobu
* ext/fiddle/extconf.rb: when pkg_config failed, module version is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: libffi on mswinnobu
* ext/fiddle/extconf.rb: try to compile libffi as mingw on mswin if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22extconf.rb: libffi with librubynobu
* ext/fiddle/extconf.rb: link libffi with libruby for symbols provided by ruby on some platforms, e.g. alloca. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22extconf.rb: configure libffi firstnobu
* ext/fiddle/extconf.rb: configure libffi for the check requires the headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: modversion may be unavailablenobu
* ext/fiddle/extconf.rb: modversion may be unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: do not disturb other checksnobu
* ext/fiddle/extconf.rb: add the local ffi library and header just before create_makefile, not to disturb other checks. also prepend the extension path name to the local library name for static linked ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21handle.c: suppress warningsnobu
* ext/fiddle/handle.c (CHECK_DLERROR): suppress warnings for using the result of an assignment as a condition without parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: fix build failuresnobu
* ext/fiddle/depend (build-libffi): get rid of eventually empty target for nmake. * ext/fiddle/extconf.rb: omit stuffs for libffi unless bundled libffi is found and used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21handle.c: suppress a warningnobu
* ext/fiddle/handle.c (rb_fiddle_handle_initialize): suppress an unused-but-set-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-20fiddle: configure in mflagsnobu
* ext/fiddle/extconf.rb: configure is already in mflags, use system instead of xsystem which requires a string, and logging libffi configure output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-20fiddle: bundled libffinobu
* ext/fiddle/depend, ext/fiddle/extconf.rb: try to build bundled libffi if existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31* ext/dl/*: remove DL as it is replaced by Fiddle.tenderlove
[Feature #5458] Thanks to Jonan Scheffler <jonanscheffler@gmail.com> for this patch * test/dl/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04ext: protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-15fiddle/import.rb: fix typonobu
* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof): fix typo, SIZEOF_LONG_LON. [Fix GH-714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-21fiddle/extconf.rb: supply 0nobu
* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION with 3-digit. libffi 3.1 returns just 2-digit. [ruby-core:62920] [Bug #9897] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09fiddle/function.c: fix memory leak on exceptionnobu
* ext/fiddle/function.c (function_call): fix memory leak when an exception occurs at argument conversion or the function call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09fiddle/function.c: check argument sizenobu
* ext/fiddle/function.c (initialize): check argument number if the temporary buffer exceeds size_t max. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-08ext/dl, ext/fiddle: fix memory leaknobu
* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free), ext/fiddle/handle.c (fiddle_handle_free), ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak. based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e