Age | Commit message (Collapse) | Author |
|
* 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
Notes:
Merged: https://github.com/ruby/ruby/pull/3780
|
|
For example, :voidp equals to Fiddle::TYPE_VOID_P.
https://github.com/ruby/fiddle/commit/3b4de54899
Notes:
Merged: https://github.com/ruby/ruby/pull/3780
|
|
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
Notes:
Merged: https://github.com/ruby/ruby/pull/3780
|
|
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(obj)
* rb_ractor_std*()
* rb_cRactor
and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
(to avoid conflict with include/ruby/ractor.h)
Notes:
Merged: https://github.com/ruby/ruby/pull/3775
|
|
https://github.com/ruby/date/commit/f6140df0ad
|
|
https://github.com/ruby/date/commit/f08175e34d
|
|
https://github.com/ruby/date/commit/d20380fc55
|
|
https://github.com/ruby/date/commit/3c002b1daa
|
|
https://github.com/ruby/date/commit/58ca6e6a3e
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3712
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3712
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3712
|
|
- ext/win32/lib/win32/sspi.rb: Use fiddle (win32/importer) instead of Win32API
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3753
|
|
|
|
But win32ole gem is still experimental for 3.0.0-preview2.
I'm working to extract this library on https://github.com/ruby/win32ole.
|
|
This way the header flags and object internals are set correctly
Notes:
Merged: https://github.com/ruby/ruby/pull/3719
|
|
```
find . -name \*.o -exec nm {} + |&
sed '/Init_.*\.rbimpl_id/!d;s/^.* b //;s/\.[1-9][0-9]*$//;s/\.rbimpl_id$//' |
uniq
```
should be empty.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3589
|
|
|
|
If set to true all parsed objects will be
immediately frozen, and strings will be
deduplicated if the Ruby implementation
allows it.
|
|
* Added sync task for digest
* Update doc/* for default gems
* Update the latest version of gemspec
|
|
This reverts commit f39021be7e0eac20ef7f06592769955ea482470f.
|
|
|
|
|
|
|
|
|
|
https://github.com/ruby/io-console/commit/f84e6abcce
|
|
When `min: 0` is given to `IO#getch` with `time:` option, it is
expected to return nil if timed out, and needed for source code
the compatibility with unixen platforms.
https://github.com/ruby/io-console/commit/a2afbe72bd
|
|
Fixed TypeError when IO#getch timed out
`rb_io_wait` returns a bit-flags Integer representing available
events, or Qfalse if timed out. Also the result of `NUM2INT` is
not a `VALUE`.
```
$ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)"
ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32]
-e:1:in `getch': no implicit conversion of false into Integer (TypeError)
from -e:1:in `<main>'
```
https://github.com/ruby/io-console/commit/3bdfaf62df
|
|
* Fixed backward compatibility.
* Added missing `rb_scheduler_timeout` declaration.
https://github.com/ruby/io-console/commit/813806079f
|
|
alway -> always
Notes:
Merged: https://github.com/ruby/ruby/pull/3646
|
|
This iterator uses an st_table, but if objects move the references in
the st table won't be updated. This patch just changes the st table to
an identity hash.
Notes:
Merged: https://github.com/ruby/ruby/pull/3634
|
|
|
|
This was a workaround for RUBY_ALIGNOF's glitch, which has already been
fixed. See also https://github.com/ruby/ruby/pull/3570
Notes:
Merged: https://github.com/ruby/ruby/pull/3631
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3623
|
|
RDoc says `ObjectSpace.dump(obj, output: :stdout) # => nil`,
but it returns STDOUT since fbba6bd4e3dff7a61965208fecae908f10c4edbe.
I think it is unintentional change.
Notes:
Merged: https://github.com/ruby/ruby/pull/3620
|
|
* memory_view.c: Use ssize_t for ndim in memory_view
* include/ruby/memory_view.h: Fix the type of item_size argument
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
|
|
|
|
We have code common to all heap iteration paths in this file. Refactor
such that we keep ASAN checks and flags checks in one place
Notes:
Merged: https://github.com/ruby/ruby/pull/3592
|
|
Again, this code is walking the heap. Empty slots can be poisoned, so
we need to unpoison before checking the type
Notes:
Merged: https://github.com/ruby/ruby/pull/3592
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3592
|
|
ext/objspace iterates over the heap, but some slots in the heap are
poisoned, so we need to take care of that when running with ASAN
Notes:
Merged: https://github.com/ruby/ruby/pull/3592
|
|
|
|
https://github.com/ruby/ruby/runs/1169621878
|
|
The added test case crashes the interpreter because it makes
ObjectSpace.internal_class_of return the second VALUE slot of an AST
imemo object. The second VALUE slot of `struct rb_ast_struct` is
not a VALUE and not a pointer to a Ruby object.
Notes:
Merged: https://github.com/ruby/ruby/pull/3503
|
|
|
|
https://github.com/ruby/readline-ext/commit/f9783c0739
|
|
* Add buffer protocol
* Modify for some review comments
* Per-object buffer availability
* Rename to MemoryView from Buffer and make compilable
* Support integral repeat count in memory view format
* Support 'x' for padding bytes
* Add rb_memory_view_parse_item_format
* Check type in rb_memory_view_register
* Update dependencies in common.mk
* Add test of MemoryView
* Add test of rb_memory_view_init_as_byte_array
* Add native size format test
* Add MemoryView test utilities
* Add test of rb_memory_view_fill_contiguous_strides
* Skip spaces in format string
* Support endianness specifiers
* Update documentation
* Support alignment
* Use RUBY_ALIGNOF
* Fix format parser to follow the pack format
* Support the _ modifier
* Parse count specifiers in get_format_size function.
* Use STRUCT_ALIGNOF
* Fix test
* Fix test
* Fix total size for the case with tail padding
* Fix rb_memory_view_get_item_pointer
* Fix rb_memory_view_parse_item_format again
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|