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

Version Path
ddtrace-1.5.2 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.5.1 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.5.0 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.4.2 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.4.1 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.4.0 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
ddtrace-1.3.0 ext/ddtrace_profiling_native_extension/libdatadog_helpers.h