summaryrefslogtreecommitdiff
path: root/ext/fiddle
AgeCommit message (Collapse)Author
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338
2020-08-18Update the license for the default gems to dual licensesHiroshi SHIBATA
2020-06-28[ruby/fiddle] support for very old libffiNobuyoshi Nakada
Define `Fiddle::TYPE_VARIADIC` only when `ffi_prep_cif_var` is available, otherwise skip the test for it.
2020-06-28[ruby/fiddle] try bundled libffi by defaultNobuyoshi Nakada
If no installed libffi found, use bundled libffi unless explicitly `--disable-bundled-libffi` option is given. Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-27[ruby/fiddle] Support MSWIN (#43)Sutou Kouhei
https://github.com/ruby/fiddle/commit/f16e7ff6e0 Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-27[ruby/fiddle] Add missing includeSutou Kouhei
https://github.com/ruby/fiddle/commit/4ca61efcd7 Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-27[ruby/fiddle] Add support for variadic argumentsSutou Kouhei
GitHub: fix GH-39 Reported by kojix2. Thanks!!! https://github.com/ruby/fiddle/commit/6c4cb904dc Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-27[ruby/fiddle] Use meaningful variable nameSutou Kouhei
https://github.com/ruby/fiddle/commit/2cac24b7c8 Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-27[ruby/fiddle] Use "do { } while (0)" to ensure requiring ";"Sutou Kouhei
https://github.com/ruby/fiddle/commit/2155ae5979 Notes: Merged: https://github.com/ruby/ruby/pull/3265
2020-06-26[ruby/fiddle] Fixed typosNobuyoshi Nakada
https://github.com/ruby/fiddle/commit/a09e66adf4 https://github.com/ruby/fiddle/commit/6cab9b45d6 https://github.com/ruby/fiddle/commit/ab72b19bed
2020-05-27autoconf may not be availableNobuyoshi Nakada
2020-05-27fiddle: need to update configure after updating config toolsNobuyoshi Nakada
2020-05-26_GNU_SOURCE is needed for mkostemp on CygwinNobuyoshi Nakada
2020-05-24ext/fiddle/fiddle.gemspec: avoid require lib/fiddle/version.rbYusuke Endoh
It loads `ext/fiddle/lib/fiddle/version.rb`, which causes constant redefinition warning: http://rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200523T153003Z.log.html.gz ``` [ 6317/20193] TestDefaultGems#test_validate_gemspec/home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/ext/fiddle/lib/fiddle/version.rb:2: warning: already initialized constant Fiddle::VERSION /home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/.ext/common/fiddle/version.rb:2: warning: previous definition of VERSION was here = 0.16 s ``` This changeset read the version by manual parsing hack which is also used in stringio and zlib.
2020-05-23[ruby/fiddle] Improve documentation on how to correctly free memory and free ↵Chris Seaton
memory in tests (#33) https://github.com/ruby/fiddle/commit/e59cfd708a
2020-05-23[ruby/fiddle] Export Fiddle::VERSIONSutou Kouhei
https://github.com/ruby/fiddle/commit/1b93a2d9db Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Update file listSutou Kouhei
https://github.com/ruby/fiddle/commit/b04cb92d7b Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Fix a typoSutou Kouhei
https://github.com/ruby/fiddle/commit/445ca6b501 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Bump versionSutou Kouhei
https://github.com/ruby/fiddle/commit/f8fb7c4823 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Add Fiddle::VERSIONSutou Kouhei
https://github.com/ruby/fiddle/commit/9dcf64c096 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Add missing spec.extensionsSutou Kouhei
https://github.com/ruby/fiddle/commit/2ce36b1fdc Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Fix assignment to array within struct (#26)sinisterchipmunk
* Allow access to a struct's underlying memory with `struct[offset, length]`. https://github.com/ruby/fiddle/commit/24083690a6 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Make array access override compatible with base class (#25)sinisterchipmunk
* Allow access to a struct's underlying memory with `struct[offset, length]`. * Make accessing a struct's underlying memory more convenient. * refactor memory access unit tests for improved clarity https://github.com/ruby/fiddle/commit/c082c81bb5 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-23[ruby/fiddle] Initialize memory to 0 when calling Fiddle.malloc(). (#24)sinisterchipmunk
https://github.com/ruby/fiddle/commit/8414239ca3 Notes: Merged: https://github.com/ruby/ruby/pull/3068
2020-05-13ext/fiddle/extconf.rb: Fix the condition of libffi <= 3.1Yusuke Endoh
ver is [3, 1, 0] which is not less then or equal to [3, 1]
2020-05-13Do not try ffi_closure_alloc if libffi is <= 3.1Yusuke Endoh
Maybe due to e1855100e46040e73630b378974c17764e0cccee, CentOS, RHEL, and Fedora CIs have started failing with SEGV. Try to avoid ffi_closure_alloc on those environments. https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora32/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200512T183003Z.fail.html.gz
2020-05-13ext/fiddle/extconf.rb: check if ffi_closure_alloc is availableYusuke Endoh
to define HAVE_FFI_CLOSURE_ALLOC. The macro is used in closure.c, so have_func check is needed. If pkg-config is not installed, extconf.rb fails to detect the version of libffi, and does not add "-DUSE_FFI_CLOSURE_ALLOC=1" even when system libffi version is >= 3.2. If USE_FFI_CLOSURE_ALLOC is not defined, closure.c attempts to check if HAVE_FFI_CLOSURE_ALLOC is defined or not, but have_func was removed with 528a3a17977aa1843a26630c96635c3cb161e729, so the macro is always not defined. This resulted in this deprecation warning: https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200512T123003Z.log.html.gz ``` compiling closure.c closure.c: In function 'initialize': closure.c:265:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations] 265 | result = ffi_prep_closure(pcl, cif, callback, (void *)self); | ^~~~~~ In file included from ./fiddle.h:42, from closure.c:1: /usr/include/x86_64-linux-gnu/ffi.h:334:1: note: declared here 334 | ffi_prep_closure (ffi_closure*, | ^~~~~~~~~~~~~~~~ ```
2020-05-12fiddle: share the same config toolsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3102
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