| Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12616
|
|
to work for all
(https://github.com/ruby/fiddle/pull/173)
https://github.com/ruby/fiddle/commit/ef2382a7ef
|
|
statically
(https://github.com/ruby/fiddle/pull/172)
`RUBY_ENGINE` and `Fiddle::WINDOWS` should not change in a process, no
need to be checked inside the methods.
Also, `win32_last_error` and `win32_last_socket_error` are equal to
`last_error` on JRuby.
https://github.com/ruby/fiddle/commit/50ac00ed53
|
|
parsing
(https://github.com/ruby/fiddle/pull/169)
GitHub: fix https://github.com/ruby/fiddle/pull/168
Struct parsing invokes "parse_ctype" on the whole member signature,
which fails if member type is "bool" due to plain string matching for
it. This change updates "bool" type matching to a regexp, so TYPE_BOOL
is correctly parsed for a whole signature like "bool toggle" as well as
just "bool".
---------
https://github.com/ruby/fiddle/commit/71607446d4
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/12568
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/12469
|
|
|
|
(https://github.com/ruby/fiddle/pull/162)
This allows for passing integers as pointer arguments to functions when
using the FFI backend. This is a workaround until we can get JRuby's FFI
implementation to allow for it directly (see also
https://github.com/jruby/jruby/pull/8423)
---------
https://github.com/ruby/fiddle/commit/e2f0952e9b
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/166
Arch Linux's libncurses.so uses this style.
https://github.com/ruby/fiddle/commit/77d3dc934f
|
|
FFI backend
(https://github.com/ruby/fiddle/pull/165)
https://github.com/ruby/fiddle/commit/0bd963d3b8
|
|
The evaluation order of C arguments is unspecified.
`RSTRING_LEN(str)` would fails if the conversion to a String by
`StringValuePtr` is not done yet.
Coverity Scan found this issue.
Notes:
Merged: https://github.com/ruby/ruby/pull/12209
|
|
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/159
It's used by FFI test. So Symbol may be used by other use cases.
https://github.com/ruby/fiddle/pull/139 introduced the "Function name is String" limitation. This
commit removed the limitation.
Reported by Mamoru TASAKA. Thanks!!!
https://github.com/ruby/fiddle/commit/cea30fe5f9
|
|
|
|
(https://github.com/ruby/fiddle/pull/155)
GitHub: fix https://github.com/ruby/fiddle/pull/153
mkmf requires fileutils. JRuby doesn't like it.
https://github.com/ruby/fiddle/commit/df4bd21fc3
|
|
(https://github.com/ruby/fiddle/pull/157)
The GCC warning puts undefined macro names in double quotes while clang
puts them in single quotes.
https://github.com/ruby/fiddle/commit/7dcb40bccb
|
|
FFI backend
(https://github.com/ruby/fiddle/pull/156)
* From https://github.com/ruby/reline/issues/766#issuecomment-2422135968
https://github.com/ruby/fiddle/commit/eea9fd0cc4
|
|
|
|
Fix GH-145
Rename `lib/fiddle/jruby.rb` to `lib/fiddle/ffi_backend.rb` as a generic
ffi gem API based implementation.
JRuby and TruffleRuby use `lib/fiddle/ffi_backend.rb`.
---------
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
|
|
(https://github.com/ruby/fiddle/pull/139)
https://github.com/ruby/fiddle/commit/91d0ea9849
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
pointer
(https://github.com/ruby/fiddle/pull/150)
With gcc 13 and -pedantic:
```
../../../src/ext/fiddle/function.c: In function ‘function_call’:
../../../src/ext/fiddle/function.c:374:15: error: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
374 | args.fn = (void(*)(void))NUM2PTR(cfunc);
| ^
../../../src/ext/fiddle/pointer.c: In function ‘rb_fiddle_ptr_inspect’:
../../../src/ext/fiddle/pointer.c:573:84: error: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
573 | RB_OBJ_CLASSNAME(self), (void *)data, data->ptr, data->size, (void *)data->free);
| ^
```
https://github.com/ruby/fiddle/commit/6421e317a1
|
|
Fix GH-104
lib/fiddle/jruby.rb is based on
https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/fiddle/jruby.rb
.
Here are changes for it:
* Move `Fiddle::TYPE_*` to `Fiddle::Types::*`
* Add `Fiddle::Types::VARIADIC`
* Add `Fiddle::Types::CONST_STRING`
* Add `Fiddle::Types::BOOL`
* Add `Fiddle::Types::INT8_T`
* Add `Fiddle::Types::UINT8_T`
* Add `Fiddle::Types::INT16_T`
* Add `Fiddle::Types::UINT16_T`
* Add `Fiddle::Types::INT32_T`
* Add `Fiddle::Types::UINT32_T`
* Add `Fiddle::Types::INT64_T`
* Add `Fiddle::Types::UINT64_T`
* Add more `Fiddle::ALIGN_*` for the above new `Fiddle::Types::*`
* Add more `Fiddle::SIZEOF_*` for the above new `Fiddle::Types::*`
* Add support for specifying type as not only `Fiddle::Types::*` but
also `Symbol` like `:int`
* Add support for variable size arguments in `Fiddle::Function`
* Add `Fiddle::Closure#free`
* Add `Fiddle::Closure#freed?`
* Add `Fiddle::Error` as base the error class
* Add `Fiddle::Pointer#call_free` and stop using `FFI::AutoPointer` in
`Fiddle::Pointer`
* Add support for `Fiddle::Pointer.malloc {}` `Fiddle::Pointer`
* Add support for `Fiddle::Pointer#free=`
* Add `Fiddle::Pointer#freed?`
* Use binary string not C string for `Fiddle::Pointer#[]`
* Add `Fiddle::Handle.sym_defined?`
* Add `Fiddle::Handle#sym_defined?`
* Add `Fiddle::Handle::DEFAULT`
* Add `Fiddle::ClearedReferenceError`
* Add no-op `Fiddle::Pinned`
Some features are still "not implemented". So there are some "omit"s for
JRuby in tests.
Notes:
Merged: https://github.com/ruby/ruby/pull/11860
|
|
https://github.com/ruby/stringio/issues/81
|
|
(https://github.com/ruby/fiddle/pull/143)
Pick
https://github.com/ruby/ruby/commit/92865d8760e22dc5035a67e636fab3fbd7a77a26
from `ruby/ruby` repo.
---------
https://github.com/ruby/fiddle/commit/aad5a3bc79
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
These files were to build libffi from the bundled source, but are no
longer used since we stopped bundling the libffi sources in commit
e4f5296f065110fa83eb450d3a861253e76e534f.
The gemspec file is unchanged because fiddle gem itself still supports
ruby 2.5.
Notes:
Merged: https://github.com/ruby/ruby/pull/11285
|
|
(https://github.com/ruby/fiddle/pull/140)
Some of these commands just don't work (for example `sws` is not a Vim
setting). I think we should just remove these.
https://github.com/ruby/fiddle/commit/c3dbf7ba9a
|
|
|
|
(https://github.com/ruby/fiddle/pull/138)
See https://guides.rubygems.org/specification-reference/#metadata for changelog_uri metadata.
https://github.com/ruby/fiddle/commit/0bd8e96adc
|
|
https://github.com/ruby/fiddle/commit/fd4bb4ea8a
|
|
https://github.com/ruby/fiddle/commit/bbcb66e16e
|
|
https://github.com/ruby/fiddle/commit/74a05fb358
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/130
Reported by Benoit Daloze. Thanks!!!
https://github.com/ruby/fiddle/commit/2640e0148e
|
|
(https://github.com/ruby/fiddle/pull/134)
```
In file included from ../../../../ext/fiddle/fiddle.h:46:
/opt/local/include/ffi.h:477:5: warning: 'FFI_GO_CLOSURES' is not defined, evaluates to 0 [-Wundef]
^
```
c.f. https://github.com/libffi/libffi/pull/796
https://github.com/ruby/fiddle/commit/d4feb57098
|
|
This is actually already checked in (Ruby's) configure.
Notes:
Merged: https://github.com/ruby/ruby/pull/8274
|
|
https://github.com/ruby/fiddle/commit/c313a74632
|
|
https://github.com/ruby/fiddle/commit/69ff680bf6
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/130
Reported by Benoit Daloze. Thanks!!!
https://github.com/ruby/fiddle/commit/bc6c66bbb9
|
|
https://github.com/ruby/fiddle/commit/6cdf53726d
|
|
protected
(https://github.com/ruby/fiddle/pull/129)
They don't have a mark function, so they don't need any change.
https://github.com/ruby/fiddle/commit/9bbc732aef
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
|
(https://github.com/ruby/fiddle/pull/127)
Save from having to mark them on every minor.
https://github.com/ruby/fiddle/commit/153c09c99f
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
|
|
https://github.com/ruby/fiddle/commit/4c0c5da1a5
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/96
I wanted to add a test for this but I couldn't find a function that
has a "char" argument in libc...
Reported by kojix2. Thanks!!!
https://github.com/ruby/fiddle/commit/2c863ef8ba
|
|
https://github.com/ruby/fiddle/commit/2b22bb9d74
|
|
GitHub: fix https://github.com/ruby/fiddle/pull/100
Reported by David M. Lary. Thanks!!!
https://github.com/ruby/fiddle/commit/516333dd78
|
|
(https://github.com/ruby/fiddle/pull/123)
This commit adds two new methods, `Fiddle::Pointer.read` and
`Fiddle::Pointer.write`. Both methods take an address, and will read or
write bytes at that address respectively.
For example we can read from an address without making a Pointer object:
```ruby
Fiddle::Pointer.read(address, 5) # read 5 bytes
```
We can also write to an address without allocating a Pointer object:
```ruby
Fiddle::Pointer.write(address, "bytes") # write 5 bytes
```
This allows us to read / write memory at arbitrary addresses without
instantiating a new `Fiddle::Pointer` object.
Examples where this API would be useful
[1](https://github.com/tenderlove/tenderjit/blob/f03481d28bff4d248746e596929b0841de65f181/lib/tenderjit/fiddle_hacks.rb#L26-L28)
[2](https://github.com/tenderlove/ruby/blob/77c8daa2d40dd58eeb3785ce17dea2ee38f308d1/lib/ruby_vm/rjit/c_pointer.rb#L193)
[3](https://github.com/tenderlove/ruby/blob/77c8daa2d40dd58eeb3785ce17dea2ee38f308d1/lib/ruby_vm/rjit/c_pointer.rb#L284)
I also added a writer method for the same reasons as the reader.
---------
https://github.com/ruby/fiddle/commit/04238cefed
Co-authored-by: Sutou Kouhei <kou@clear-code.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7310
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7330
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7387
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7387
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7387
|
|
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the
macros bellow:
* `RBIMPL_ATTR_PACKED_STRUCT_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_END`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
Notes:
Merged: https://github.com/ruby/ruby/pull/7268
|