1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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.

0ffcaa39e5
This commit is contained in:
Sutou Kouhei 2020-07-09 20:19:20 +09:00 committed by Sutou Kouhei
parent 64926d5007
commit ae7b53546c
Notes: git 2020-11-18 09:05:47 +09:00
8 changed files with 121 additions and 29 deletions

View file

@ -116,6 +116,7 @@
#define TYPE_FLOAT 7
#define TYPE_DOUBLE 8
#define TYPE_VARIADIC 9
#define TYPE_CONST_STRING 10
#define ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x)