summaryrefslogtreecommitdiff
path: root/ext/fiddle
Commit message (Collapse)AuthorAgeFilesLines
...
* [ruby/fiddle] Add --enable-debug-build option to extconf.rbSutou Kouhei2021-05-181-0/+41
| | | | https://github.com/ruby/fiddle/commit/e0498e60ea
* [ruby/fiddle] win32types: sortSutou Kouhei2021-05-181-15/+15
| | | | https://github.com/ruby/fiddle/commit/35dec6c5a5
* [ruby/fiddle] Fix more Win32Types definitionsSutou Kouhei2021-05-181-11/+12
| | | | | | https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types https://github.com/ruby/fiddle/commit/805c1a595a
* [ruby/fiddle] Fix Win32Types for Windows 64-bit (#63)Orgad Shaneh2021-05-181-4/+4
| | | | | | https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types https://github.com/ruby/fiddle/commit/28ee5b1608
* [ruby/fiddle] Bump versionSutou Kouhei2021-05-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/0cbd370fd6
* [ruby/fiddle] closure: add support for const char *Sutou Kouhei2021-05-181-0/+8
| | | | | | | | GitHub: fix GH-62 Reported by Cody Krieger. Thanks!!! https://github.com/ruby/fiddle/commit/284b820f2d
* [ruby/fiddle] closure: accept symbol as typeSutou Kouhei2021-05-181-6/+12
| | | | https://github.com/ruby/fiddle/commit/dc2da6633e
* [ruby/fiddle] Remove wrong commentSutou Kouhei2021-05-181-1/+0
| | | | https://github.com/ruby/fiddle/commit/831522e768
* [ruby/fiddle] Bump versionKenta Murata2021-05-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/63e5f98412
* dependency updates卜部昌平2021-04-131-8/+0
|
* Oops! Add another test and fix to_proc implementationAaron Patterson2021-02-261-1/+2
|
* Fiddle::Function responds to to_procAaron Patterson2021-02-261-0/+5
| | | | | | | | | | This lets us cast a Fiddle::Function to a block, allowing is to write things like: ```ruby f = Fiddle::Function.new(@libc['strcpy'], [TYPE_VOIDP, TYPE_VOIDP], TYPE_VOIDP) define_method :strcpy, &f ```
* [fiddle] Update to 1.0.6Kenta Murata2020-12-231-1/+1
|
* [memory_view][fiddle] Rename len to byte_size in rb_memory_view_tKenta Murata2020-12-231-4/+4
|
* [memory_view][fiddle] Use bool for boolean return valueKenta Murata2020-12-231-3/+3
|
* fiddle: Update to 1.0.5Sutou Kouhei2020-12-233-5/+8
|
* Reword docs for Fiddle::Function#call [ci skip]Alan Wu2020-12-141-3/+2
| | | | | I'm using `<code>` instead of `+` since `+` only works when it encloses a single word.
* Import fiddle-1.0.4 (#3860)Kenta Murata2020-12-1115-156/+1096
| | | | | | | | I don't use tool/sync_default_gem.rb because the last sync was incomplete. Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: sinisterchipmunk <sinisterchipmunk@gmail.com> Co-authored-by: Sutou Kouhei <kou@clear-code.com>
* Update Fiddle's dependenciesSutou Kouhei2020-11-181-79/+244
|
* [ruby/fiddle] Remove needless returnSutou Kouhei2020-11-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/50e02f9445
* [ruby/fiddle] Bump versionSutou Kouhei2020-11-181-1/+1
| | | | https://github.com/ruby/fiddle/commit/74b65cb858
* [ruby/fiddle] Remove needless workaroundSutou Kouhei2020-11-181-3/+1
| | | | | | | It's fixed in upstream. https://github.com/MSP-Greg/ruby-loco/issues/4 https://github.com/ruby/fiddle/commit/2ae0ff4934
* [ruby/fiddle] Add workaround for ruby head for mingwSutou Kouhei2020-11-181-1/+3
| | | | https://github.com/ruby/fiddle/commit/bb227c206d
* [ruby/fiddle] Use msys2_mingw_dependenciesSutou Kouhei2020-11-181-0/+2
| | | | https://github.com/ruby/fiddle/commit/fee175a8ff
* [ruby/fiddle] Use ruby_xcalloc() instead of ruby_xmalloc() and memset()Sutou Kouhei2020-11-181-3/+1
| | | | https://github.com/ruby/fiddle/commit/6d24fb5438
* [ruby/fiddle] Remove needless rescueSutou Kouhei2020-11-181-5/+1
| | | | | | | | GitHub: fix GH-15 Reported by Eneroth3. Thanks!!! https://github.com/ruby/fiddle/commit/f3d70b81ec
* [ruby/fiddle] Add workaround for RubyInstaller for WindowsSutou Kouhei2020-11-181-0/+14
| | | | | | See comment for details. https://github.com/ruby/fiddle/commit/0c76f03dc4
* [ruby/fiddle] Add a "pinning" reference (#44)Aaron Patterson2020-11-186-12/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a "pinning" reference A `Fiddle::Pinned` objects will prevent the objects they point to from moving. This is useful in the case where you need to pass a reference to a C extension that keeps the address in a global and needs the address to be stable. For example: ```ruby class Foo A = "hi" # this is an embedded string some_c_function A # A might move! end ``` If `A` moves, then the underlying string buffer may also move. `Fiddle::Pinned` will prevent the object from moving: ```ruby class Foo A = "hi" # this is an embedded string A_pinner = Fiddle::Pinned.new(A) # :nodoc: some_c_function A # A can't move because of `Fiddle::Pinned` end ``` This is a similar strategy to what Graal uses: https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/PinnedObject.html#getObject-- * rename global to match exception name * Introduce generic Fiddle::Error and rearrange error classes Fiddle::Error is the generic exception base class for Fiddle exceptions. This commit introduces the class and rearranges Fiddle exceptions to inherit from it. https://github.com/ruby/fiddle/commit/ac52d00223
* [ruby/fiddle] Add support for specifying types by name as String or SymbolSutou Kouhei2020-11-185-34/+148
| | | | | | For example, :voidp equals to Fiddle::TYPE_VOID_P. https://github.com/ruby/fiddle/commit/3b4de54899
* [ruby/fiddle] Add TYPE_CONST_STRING and SIZEOF_CONST_STRING for "const char *"Sutou Kouhei2020-11-186-20/+94
| | | | | | | | Add rb_fiddle_ prefix to conversion functions.h to keep backward compatibility but value_to_generic() isn't safe for TYPE_CONST_STRING and not String src. Use rb_fiddle_value_to_generic() instead. https://github.com/ruby/fiddle/commit/0ffcaa39e5
* sed -i '/rmodule.h/d'卜部昌平2020-08-271-6/+0
|
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-6/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-6/+0
|
* Update the license for the default gems to dual licensesHiroshi SHIBATA2020-08-181-1/+1
|
* [ruby/fiddle] support for very old libffiNobuyoshi Nakada2020-06-281-0/+2
| | | | | Define `Fiddle::TYPE_VARIADIC` only when `ffi_prep_cif_var` is available, otherwise skip the test for it.
* [ruby/fiddle] try bundled libffi by defaultNobuyoshi Nakada2020-06-281-1/+1
| | | | | If no installed libffi found, use bundled libffi unless explicitly `--disable-bundled-libffi` option is given.
* [ruby/fiddle] Support MSWIN (#43)Sutou Kouhei2020-06-273-31/+48
| | | | https://github.com/ruby/fiddle/commit/f16e7ff6e0
* [ruby/fiddle] Add missing includeSutou Kouhei2020-06-271-0/+2
| | | | https://github.com/ruby/fiddle/commit/4ca61efcd7
* [ruby/fiddle] Add support for variadic argumentsSutou Kouhei2020-06-274-63/+197
| | | | | | | | GitHub: fix GH-39 Reported by kojix2. Thanks!!! https://github.com/ruby/fiddle/commit/6c4cb904dc
* [ruby/fiddle] Use meaningful variable nameSutou Kouhei2020-06-271-3/+3
| | | | https://github.com/ruby/fiddle/commit/2cac24b7c8
* [ruby/fiddle] Use "do { } while (0)" to ensure requiring ";"Sutou Kouhei2020-06-271-8/+8
| | | | https://github.com/ruby/fiddle/commit/2155ae5979
* [ruby/fiddle] Fixed typosNobuyoshi Nakada2020-06-261-4/+5
| | | | | | https://github.com/ruby/fiddle/commit/a09e66adf4 https://github.com/ruby/fiddle/commit/6cab9b45d6 https://github.com/ruby/fiddle/commit/ab72b19bed
* autoconf may not be availableNobuyoshi Nakada2020-05-271-1/+1
|
* fiddle: need to update configure after updating config toolsNobuyoshi Nakada2020-05-271-0/+2
|
* _GNU_SOURCE is needed for mkostemp on CygwinNobuyoshi Nakada2020-05-262-0/+12
|
* ext/fiddle/fiddle.gemspec: avoid require lib/fiddle/version.rbYusuke Endoh2020-05-241-6/+9
| | | | | | | | | | | | | | | 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.
* [ruby/fiddle] Improve documentation on how to correctly free memory and free ↵Chris Seaton2020-05-232-6/+31
| | | | | | memory in tests (#33) https://github.com/ruby/fiddle/commit/e59cfd708a
* [ruby/fiddle] Export Fiddle::VERSIONSutou Kouhei2020-05-231-1/+3
| | | | https://github.com/ruby/fiddle/commit/1b93a2d9db
* [ruby/fiddle] Update file listSutou Kouhei2020-05-231-3/+32
| | | | https://github.com/ruby/fiddle/commit/b04cb92d7b
* [ruby/fiddle] Fix a typoSutou Kouhei2020-05-231-1/+1
| | | | https://github.com/ruby/fiddle/commit/445ca6b501