diff options
-rw-r--r-- | README.EXT | 10 | ||||
-rw-r--r-- | README.EXT.ja | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/README.EXT b/README.EXT index 6ba0e6fec6..a60d559092 100644 --- a/README.EXT +++ b/README.EXT @@ -1081,6 +1081,15 @@ rb_float_new(f) :: double -> Float +RSTRING_LEN(str) :: + + String -> length of String data in bytes + +RSTRING_PTR(str) :: + + String -> pointer to String data + Note that the result pointer may not be NULL-terminated + StringValue(value) :: Object with #to_str -> String @@ -1092,6 +1101,7 @@ StringValuePtr(value) :: StringValueCStr(value) :: Object with #to_str -> pointer to String data without NULL bytes + It is guaranteed that the result data is NULL-terminated rb_str_new2(s) :: diff --git a/README.EXT.ja b/README.EXT.ja index 5a0073e977..ddd91d4dd0 100644 --- a/README.EXT.ja +++ b/README.EXT.ja @@ -1119,6 +1119,8 @@ Data_Get_Struct(data, type, sval) :: rb_integer_pack(value, words, numwords, wordsize, nails, flags), rb_integer_unpack(words, numwords, wordsize, nails, flags) NUM2DBL(value) rb_float_new(f) + RSTRING_LEN(str) + RSTRING_PTR(str) StringValue(value) StringValuePtr(value) StringValueCStr(value) |