Sha256: 901805dccea543fa9c4ac8db2b7438fded6700b323309da88bbc310e3ddcc7b2
Contents?: true
Size: 427 Bytes
Versions: 7
Compression:
Stored size: 427 Bytes
Contents
#pragma once #include <ddprof/ffi.h> #include "ruby_helpers.h" inline static ddprof_ffi_CharSlice char_slice_from_ruby_string(VALUE string) { ENFORCE_TYPE(string, T_STRING); ddprof_ffi_CharSlice char_slice = {.ptr = StringValuePtr(string), .len = RSTRING_LEN(string)}; return char_slice; } inline static VALUE ruby_string_from_vec_u8(ddprof_ffi_Vec_u8 string) { return rb_str_new((char *) string.ptr, string.len); }
Version data entries
7 entries across 7 versions & 1 rubygems