Closed eregon closed 10 months ago
Good catch. I've implemented it.
Thanks!
Ideally extern "bool foo(void *buffer)"
would return Ruby true/false, not 1/0 (which are both truthy in Ruby).
Do you think Fiddle could handle that?
Ah, then we should not implement bool
as an alias.
@kou Should we revert https://github.com/ruby/fiddle/commit/bc6c66bbb9fdbb23019287d79d63b79f12e23fea maybe? Because if bool
is then implemented properly to use Ruby true/false instead of 1/0 then it would be incompatible when that changes.
Is it for Ruby 3.3.0?
If I can implement bool
<-> Ruby's true
/false
soon, we don't need to revert the commit, right?
Implemented.
Thanks! Yeah, I just wanted to avoid the half-done support for boolean to get in a Fiddle release, or if it did for as short as possible.
for
extern "bool foo(void *buffer)"
withextend Fiddle::Importer
.Maybe a workaround is to use
typealias
, but not sure what would be the correct type then.