summaryrefslogtreecommitdiff
path: root/ext/fiddle
AgeCommit message (Collapse)Author
2020-05-12extlibs.rb: added variable referencesNobuyoshi Nakada
Reduce duplicate parts such as package name and version numbers. Notes: Merged: https://github.com/ruby/ruby/pull/3102
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-03-21Show libffi version only if setNobuyoshi Nakada
2020-03-08Do not set USE_FFI_CLOSURE_ALLOC=1 in fiddle on OpenBSDJeremy Evans
On OpenBSD, USE_FFI_CLOSURE_ALLOC was always set to 0 previously. In 633a1f15d8228236094ddee12e4e169d655ec49e, the code was modified in a way that it ended up being set to 1 on OpenBSD. However, that results in SIGABRT when running make test-all, inside ffi_closure_free. Setting USE_FFI_CLOSURE_ALLOC back to 0 fixes the issue.
2020-03-07Use osuosl instead of GitHub releasesHiroshi SHIBATA
Because the package provided by GitHub releases is different from sourceware.
2020-03-07Switch to download libffi source package to github releases from sourceware.orgHiroshi SHIBATA
2020-03-05Fixed a typoNobuyoshi Nakada
2020-03-05[ruby/fiddle] always use ffi_closure_alloc on WindowsNobuyoshi Nakada
2020-03-04[ruby/fiddle] use ffi_closure_alloc only with 3.2 or laterNobuyoshi Nakada
2020-03-04[ruby/fiddle] ffi_closure_free is available in the bundled libffiNobuyoshi Nakada
2020-03-04[ruby/fiddle] Use ffi_closure_free if availableNobuyoshi Nakada
2020-03-04Revert "Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)"""Yusuke Endoh
This reverts commit 87f6154bb4c67ca77ee353bb1fe25a922036c0e5. It turned out that the change fails to build on macOS https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20200304T074503Z.fail.html.gz ``` + make 'TESTS=--hide-skip -v fiddle' RUBYOPT=-w test-all dyld: lazy symbol binding failed: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace dyld: Symbol not found: _ffi_closure_alloc Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle Expected in: flat namespace make: *** [yes-test-all] Abort trap: 6 ```
2020-03-04Revert "Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)""Yusuke Endoh
This reverts commit efd641ffab34e433a8d8a7d78914576f2425aa90. This changeset seems to be needed to suppress a warning on Ubuntu 20.04 https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20200304T033004Z.log.html.gz ``` closure.c:264:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations] 264 | result = ffi_prep_closure(pcl, cif, callback, (void *)self); | ^~~~~~ ``` I guess there was a reason why the commit was reverted (maybe some CIs failed?), so try it again.
2020-01-22Drop executable bit of *.{yml,h,mk.tmpl}Kazuhiro NISHIYAMA
2019-11-18Update dependenciesNobuyoshi Nakada
2019-10-24Revert "[ruby/fiddle] Use ffi_closure_free by default. (#20)"Hiroshi SHIBATA
This reverts commit ce6caade7c57a505f73086ccd7b33c14f7715f22. Notes: Merged: https://github.com/ruby/ruby/pull/2603
2019-10-24[ruby/fiddle] Remove taint support (#21)Jeremy Evans
Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/fiddle/commit/18d6fb6915
2019-10-24[ruby/fiddle] Use ffi_closure_free by default. (#20)Vít Ondruch
* Use ffi_closure_free unconditionally. The current conditionals reflect historic heritage of FFI. Usage of ffi_closure_free should be better default nowadays, because libffi 3.0.5 fixing issues of ffi_closure_free should be widely available. * RUBY_LIBFFI_MODVERSION is not used anymore. Because `ffi_closure_free()` is not used unconditionally, there is no other use for RUBY_LIBFFI_MODVERSION define, so drop its usage. * Use more meaningful variable name. `ver` variable used to be used to pupulate RUBY_LIBFFI_MODVERSION define. Since the define was removed, the `libffi_dir` variable name should better describe the remaining usage of the variable. https://github.com/ruby/fiddle/commit/c49cc79eb8
2019-10-24[ruby/fiddle] Fiddle::Function must maintain a reference to the closureAaron Patterson
If the first parameter to Fiddle::Function is a closure object (rather than an interger), `rb_Integer` will cast it to an integer but not maintain a reference to the closure. Then if the closure gets GC'd, we have a segv. This commit keeps a reference to the original parameter to initialize so that the object will not be GC'd. Fixes: https://bugs.ruby-lang.org/issues/13286 https://github.com/ruby/fiddle/commit/0fc697bbc5
2019-07-14Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada
2019-02-08Removed moving toplevel header since r12501nobu
Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20fix typo.tadd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20Merge fiddle from github repository.hsbt
* ext/fiddle/extconf.rb: It supports to build libffi with standalone gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-10* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-10revisit `RARRAY_PTR()`.ko1
* ext/fiddle/function.c (initialize): use RARRAY_AREF() instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-19fiddle/import.rb: suppress warningnobu
* ext/fiddle/lib/fiddle/import.rb: suppress exception report when $DEBUG is enabled. [ruby-core:86536] [Bug #14686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bitnormal
Fixes: r62450 (commit 1aaeeb326e754c5c5db83fbf35f780f729a9dfed) ("long long is a C99ism") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-17long long is a C99ismshyouhei
so SIZEOF_LONG_LONG is not always available. We have to check its defined?-ness before using. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16add casts (cosmetic; just be explicit)shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16no ID cache in Init functionsnobu
Init functions are called only once, cache is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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