summaryrefslogtreecommitdiff
path: root/ext/fiddle
AgeCommit message (Collapse)Author
2017-12-06Bump fiddle-1.0.0 for released version.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Added explicitly require to example code.hsbt
https://github.com/ruby/ruby/pull/1666 Patch by @guilherme [fix GH-1666] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-19Fixup r59961. Use http for libffi downloading.hsbt
A few environments couldn't handle https download. * https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20170919T032511Z.fail.html.gz * https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20170919T040500Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-19Use https instead of ftp for libffi downloading.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12Merge fiddle-1.0.0.beta2 from upstream.hsbt
* ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-19Make string literal to frozen object on gemspec of defulte gems.hsbt
Added following gemspecs. * extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib * pure ruby libraries: cmath, csv, fileutils, scanf, webrick psych and rdoc is out of scope of this commit. I will merge after upstream was change to `frozen_string_literal: true`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Add sha512nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-05Added initial gemspec for ruby/fiddle.hsbt
[Feature #13403][ruby-core:80577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22ruby tool/update-deps --fixshyouhei
Onigumo 6 (r57045) introduced new onigumo.h header file, which is required from quite much everywhere. This commit adds necessary dependencies. Note: ruby/oniguruma.h now includes onigumo.h, ruby/io.h includes oniguruma.h, ruby/encoding.h also includes oniguruma.h, and internal.h includes encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-11fiddle/depend: build-libffinobu
* ext/fiddle/depend (build-libffi): get rid of making $(LIBFFI_A) a sole target, which may be empty when installed libffi is found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10fiddle: fix $(SUBMAKE_PRE)nobu
* ext/fiddle/extconf.rb: fix $(SUBMAKE_PRE) to chdir to $(LIBFFI_DIR) instead of $(@D), since $(LIBFFI_A) is not underneath libffi but under .libs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-09fiddle: jobserver for libffinobu
* ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive make, so that jobserver works. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06Update dependenciesnobu
* common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11fiddle/import.rb: suppress warningsnobu
* ext/fiddle/lib/fiddle/import.rb (type_alias, handler): suppress "not initialized instance variable" warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16* ext/fiddle/handle.c: check tainted string arguments.nagachika
Patch provided by tenderlove and nobu. * test/fiddle/test_handle.rb (class TestHandle): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13function.c: fix typonobu
* ext/fiddle/function.c (initialize): fix typo "ary" to "args", and adjust type of variables to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13* ext/fiddle/function.c: fix build error introduced at r53082.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13function.c: check argumentsnobu
* ext/fiddle/function.c (initialize): check all arguments first. reported by Marcin 'Icewall' Noga of Cisco Talos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13conversions.h: PTR2NUMnobu
* ext/fiddle/conversions.h (PTR2NUM): use signed integer to make Fixnum for negative values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11NEWS: add note about Fiddle GVL releasenormal
* NEWS: note Fiddle GVL release [Feature #11607] * ext/fiddle/function.c (Init_fiddle_function): document above, too git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* ext/**/*.c (*_memsize): same as r52986 for extensions.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-23fiddle: release GVL for ffi_callnormal
Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h * ext/fiddle/function.c (struct nogvl_ffi_call_args): new struct for GVL release (nogvl_ffi_call): new function (function_call): adjust for GVL release [ruby-core:71642] [Feature #11607] * ext/fiddle/closure.c (struct callback_args): new struct for GVL acquire (with_gvl_callback): adjusted original callback function (callback): wrapper for conditional GVL acquire * ext/fiddle/depend: add dependencies * ext/fiddle/extconf.rb: include top_srcdir for internal.h * internal.h (ruby_thread_has_gvl_p): expose for fiddle * vm_core.h (ruby_thread_has_gvl_p): moved to internal.h * test/fiddle/test_function.rb (test_nogvl_poll): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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