mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
* include/ruby/ruby.h (ExportStringValue): new macro to convert
string in internal encoding to external to export. * string.c (rb_str_export): new function to do conversion to external encoding. * ext/sdbm/init.c: encoding conversion support. * ext/dbm/dbm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52b3e3b97f
commit
6259c87d02
6 changed files with 117 additions and 77 deletions
|
@ -373,6 +373,12 @@ void rb_check_safe_str(VALUE);
|
|||
/* obsolete macro - use SafeStringValue(v) */
|
||||
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
|
||||
|
||||
VALUE rb_str_export(VALUE);
|
||||
#define ExportStringValue(v) do {\
|
||||
SafeStringValue(v);\
|
||||
(v) = rb_str_export(v);\
|
||||
} while (0)
|
||||
|
||||
VALUE rb_get_path(VALUE);
|
||||
#define FilePathValue(v) ((v) = rb_get_path(v))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue