diff options
author | Sutou Kouhei <kou@clear-code.com> | 2020-07-09 20:19:20 +0900 |
---|---|---|
committer | Sutou Kouhei <kou@cozmixng.org> | 2020-11-18 09:05:13 +0900 |
commit | ae7b53546ca18b56c23f612b6935e98268a07602 (patch) | |
tree | 6669206356ba05e4ee4d0e34dd99901ad1ea268c /ext/fiddle/lib | |
parent | 64926d500782cadf578724c3d1e7f59e7aaf200f (diff) |
[ruby/fiddle] Add TYPE_CONST_STRING and SIZEOF_CONST_STRING for "const char *"
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
Notes:
Merged: https://github.com/ruby/ruby/pull/3780
Diffstat (limited to 'ext/fiddle/lib')
-rw-r--r-- | ext/fiddle/lib/fiddle/import.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fiddle/lib/fiddle/import.rb b/ext/fiddle/lib/fiddle/import.rb index 178ebb8c76..5fcbb1ced8 100644 --- a/ext/fiddle/lib/fiddle/import.rb +++ b/ext/fiddle/lib/fiddle/import.rb @@ -121,6 +121,8 @@ module Fiddle return SIZEOF_DOUBLE when TYPE_VOIDP return SIZEOF_VOIDP + when TYPE_CONST_STRING + return SIZEOF_CONST_STRING else if defined?(TYPE_LONG_LONG) and ty == TYPE_LONG_LONG |