https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?15064139052012-12-05T12:20:08ZRuby Issue Tracking SystemRuby trunk - Bug #7514: DL::Function and DL::Importer#bind_function ignores abi and name when Fiddle is availablehttps://bugs.ruby-lang.org/issues/7514?journal_id=344022012-12-05T12:20:08Zngoto (Naohisa Goto)ngotogenome@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset <a class="changeset" title="* ext/dl/lib/dl/func.rb (DL::Function#initialize, DL::Function#bind): ABI should be set by usin..." href="https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/38202">r38202</a>.<br>
Naohisa, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>ext/dl/lib/dl/func.rb (DL::Function#initialize, DL::Function#bind):
ABI should be set by using CFunc#calltype even when Fiddle is used.
When Fiddle is used and a block is given, name shoud not be ignored.
[Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: DL::Function and DL::Importer#bind_function ignores abi and name when Fiddle is available (Closed)" href="https://bugs.ruby-lang.org/issues/7514">#7514</a>]</li>
<li>ext/dl/lib/dl/import.rb (DL::Importer#bind_function): should respect
abi and name when Fiddle is used.</li>
<li>test/dl/test_func.rb (test_name_with_block): test for &quot;name&quot; method
with giving a block.</li>
</ul>
Ruby trunk - Bug #7514: DL::Function and DL::Importer#bind_function ignores abi and name when Fiddle is availablehttps://bugs.ruby-lang.org/issues/7514?journal_id=344052012-12-05T18:17:05Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Category</strong> set to <i>ext</i></li><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>ngoto (Naohisa Goto)</i></li><li><strong>Target version</strong> set to <i>2.0.0</i></li></ul><p>Hmm, when using DL::Function, the patch solves the problem.</p>
<p>But, when we try to shift to Fiddle from DL, since Fiddle::Function<br>
does not still have name.<br>
So we can not shift simply.<br>
I think that better solution of this problem is not deceiving DL::Function,<br>
but adding name to Fiddle::Function perfectly.</p>
<p>Goto-san, Aaron, how do you think about this?</p>
<p>In addition, I am actually afflicted by this shift problem now, and this<br>
problem is serious for me. </p>
Ruby trunk - Bug #7514: DL::Function and DL::Importer#bind_function ignores abi and name when Fiddle is availablehttps://bugs.ruby-lang.org/issues/7514?journal_id=344872012-12-07T02:02:33Zngoto (Naohisa Goto)ngotogenome@gmail.com
<ul></ul><p>In the commit <a class="changeset" title="* ext/fiddle/lib/fiddle/function.rb (Fiddle::Function#name): new attribute needed to switch Win..." href="https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/38243">r38243</a>, Fiddle::Function#name is added, and Fiddle::Importer#import_function and bind_function set the name. The name attribute would be used by Fiddle version of Win32::Registry.</p>
Ruby trunk - Bug #7514: DL::Function and DL::Importer#bind_function ignores abi and name when Fiddle is availablehttps://bugs.ruby-lang.org/issues/7514?journal_id=346152012-12-12T00:12:36Zngoto (Naohisa Goto)ngotogenome@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>In <a class="changeset" title="* ext/fiddle/function.c (Fiddle::Function.new): new keyword argument :name to set the name attrib..." href="https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/38322">r38322</a>, Fiddle::Function#initialize can get name by using :name keyword argument. For example,<br>
Fiddle::Function.new(ptr, [], Fiddle::TYPE_VOID, name: &quot;example&quot;)</p>