summaryrefslogtreecommitdiff
path: root/ext/fiddle/lib/fiddle/import.rb
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2023-10-28 06:11:30 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-08 09:25:44 +0900
commit2a6d6d3d65de43635a5f6ad38dbca170f1e40119 (patch)
tree097aff88d59c4e7329138d98408ff706846f28fe /ext/fiddle/lib/fiddle/import.rb
parentd30ea5831e0aedada3362a2d268e7bc836b93f27 (diff)
[ruby/fiddle] Use Ruby's true/false for C bool
GitHub: fix https://github.com/ruby/fiddle/pull/130 Reported by Benoit Daloze. Thanks!!! https://github.com/ruby/fiddle/commit/2640e0148e
Diffstat (limited to 'ext/fiddle/lib/fiddle/import.rb')
-rw-r--r--ext/fiddle/lib/fiddle/import.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fiddle/lib/fiddle/import.rb b/ext/fiddle/lib/fiddle/import.rb
index 09ffcef544..050708fb96 100644
--- a/ext/fiddle/lib/fiddle/import.rb
+++ b/ext/fiddle/lib/fiddle/import.rb
@@ -119,6 +119,8 @@ module Fiddle
return SIZEOF_VOIDP
when TYPE_CONST_STRING
return SIZEOF_CONST_STRING
+ when TYPE_BOOL
+ return SIZEOF_BOOL
else
if defined?(TYPE_LONG_LONG) and
ty == TYPE_LONG_LONG