MCPcopy Create free account
hub / github.com/apache/thrift / write_string_direct

Function write_string_direct

lib/rb/ext/binary_protocol_accelerated.c:81–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81static void write_string_direct(VALUE trans, VALUE str) {
82 if (TYPE(str) != T_STRING) {
83 rb_raise(rb_eStandardError, "Value should be a string");
84 }
85 str = convert_to_utf8_byte_buffer(str);
86 write_i32_direct(trans, (int32_t)RSTRING_LEN(str));
87 rb_funcall(trans, write_method_id, 1, str);
88}
89
90//--------------------------------
91// interface writing methods

Calls 2

write_i32_directFunction · 0.85

Tested by

no test coverage detected