<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/fiddle/handle.c, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/fiddle] Ractor support</title>
<updated>2024-10-16T02:24:25+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-10-11T05:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bbd5b8ddae7b3ff7205866d54cf8aca065a6d9bd'/>
<id>bbd5b8ddae7b3ff7205866d54cf8aca065a6d9bd</id>
<content type='text'>
(https://github.com/ruby/fiddle/pull/139)

https://github.com/ruby/fiddle/commit/91d0ea9849

Co-authored-by: Sutou Kouhei &lt;kou@clear-code.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/fiddle/pull/139)

https://github.com/ruby/fiddle/commit/91d0ea9849

Co-authored-by: Sutou Kouhei &lt;kou@clear-code.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Remove Vim commands</title>
<updated>2024-06-20T06:16:57+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2024-06-11T23:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e1182f93c29b6bfd43568c80c244c961059942d'/>
<id>0e1182f93c29b6bfd43568c80c244c961059942d</id>
<content type='text'>
(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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Mark Closure, Function and Handle as write barrier</title>
<updated>2023-06-28T07:36:53+00:00</updated>
<author>
<name>Jean byroot Boussier</name>
<email>jean.boussier+github@shopify.com</email>
</author>
<published>2023-05-26T13:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f1313caec1ec465836a20862f97b89e0865f9054'/>
<id>f1313caec1ec465836a20862f97b89e0865f9054</id>
<content type='text'>
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 &lt;jean.boussier@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jean.boussier@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Add `sym_defined?` methods to test if a symbol is defined (https://github.com/ruby/fiddle/pull/108)</title>
<updated>2022-10-07T06:18:51+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2022-09-13T15:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0097c7f3887ad8dd5493cb3696ac6368dc4a1014'/>
<id>0097c7f3887ad8dd5493cb3696ac6368dc4a1014</id>
<content type='text'>
I would like to check if a symbol is defined before trying to access it.
Some symbols aren't available on all platforms, so instead of raising an
exception, I want to check if it's defined first.

Today we have to do:

```ruby
begin
  addr = Fiddle::Handle.sym("something")
  # do something
rescue Fiddle::DLError
end
```

I want to write this:

```ruby
if Fiddle::Handle.sym_defined?("something")
  addr = Fiddle::Handle.sym("something")
  # do something
end
```

https://github.com/ruby/fiddle/commit/9d3371de13

Co-authored-by: Sutou Kouhei &lt;kou@clear-code.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I would like to check if a symbol is defined before trying to access it.
Some symbols aren't available on all platforms, so instead of raising an
exception, I want to check if it's defined first.

Today we have to do:

```ruby
begin
  addr = Fiddle::Handle.sym("something")
  # do something
rescue Fiddle::DLError
end
```

I want to write this:

```ruby
if Fiddle::Handle.sym_defined?("something")
  addr = Fiddle::Handle.sym("something")
  # do something
end
```

https://github.com/ruby/fiddle/commit/9d3371de13

Co-authored-by: Sutou Kouhei &lt;kou@clear-code.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Add Fiddle::Handle#file_name (https://github.com/ruby/fiddle/pull/88)</title>
<updated>2021-07-14T09:56:00+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@users.noreply.github.com</email>
</author>
<published>2021-07-14T06:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=67897762cf3cabad99effd636b50a2db26fb0f3f'/>
<id>67897762cf3cabad99effd636b50a2db26fb0f3f</id>
<content type='text'>
https://github.com/ruby/fiddle/commit/4ee1c6fc4b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/fiddle/commit/4ee1c6fc4b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Return the module handle value in Fiddle::Handle#to_i and add FIddle::Handle#to_ptr (https://github.com/ruby/fiddle/pull/87)</title>
<updated>2021-07-14T09:43:32+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@users.noreply.github.com</email>
</author>
<published>2021-07-14T02:26:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=818c74b7f4d5b88833af26226fc81e563b5d11b9'/>
<id>818c74b7f4d5b88833af26226fc81e563b5d11b9</id>
<content type='text'>
https://github.com/ruby/fiddle/commit/170111a0cb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/fiddle/commit/170111a0cb
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Add a "pinning" reference (#44)</title>
<updated>2020-11-18T00:05:13+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2020-08-02T21:26:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=307388ea19f5c9d1c8c417d1979c40d970b420a2'/>
<id>307388ea19f5c9d1c8c417d1979c40d970b420a2</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fiddle] Remove taint support (#21)</title>
<updated>2019-10-24T10:34:49+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2019-10-19T23:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b809784817649817c3e53fa000f57504446caef9'/>
<id>b809784817649817c3e53fa000f57504446caef9</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/fiddle/handle.c: check tainted string arguments.</title>
<updated>2015-12-16T12:08:49+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-16T12:08:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=79c7a51893e1c8b95d98728feb7c75bc31671ed8'/>
<id>79c7a51893e1c8b95d98728feb7c75bc31671ed8</id>
<content type='text'>
  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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  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
</pre>
</div>
</content>
</entry>
<entry>
<title>* ext/**/*.c (*_memsize): same as r52986 for extensions.</title>
<updated>2015-12-09T01:01:17+00:00</updated>
<author>
<name>ko1</name>
<email>ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-09T01:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=dff42b0ea0e6ef368ebbe0a666ff9be8d708c6df'/>
<id>dff42b0ea0e6ef368ebbe0a666ff9be8d708c6df</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
