From d9c42381b611758714a9bd9cfb53e9a16c939dd9 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Thu, 25 Jul 2024 11:15:36 +0100 Subject: [PATCH] Experiment to introduce a libdatadog Ruby binding using SWIG --- Rakefile | 6 +- datadog.gemspec | 2 +- ext/libdatadog_ruby/extconf.rb | 17 + ext/libdatadog_ruby/generate-swig.sh | 1 + ext/libdatadog_ruby/libdatadog.i | 22 + ext/libdatadog_ruby/libdatadog_wrap.c | 15682 ++++++++++++++++++++++++ libdatadog_swig_demo.rb | 50 + 7 files changed, 15778 insertions(+), 2 deletions(-) create mode 100644 ext/libdatadog_ruby/extconf.rb create mode 100755 ext/libdatadog_ruby/generate-swig.sh create mode 100644 ext/libdatadog_ruby/libdatadog.i create mode 100644 ext/libdatadog_ruby/libdatadog_wrap.c create mode 100644 libdatadog_swig_demo.rb diff --git a/Rakefile b/Rakefile index 9b595263f9d..969878ced36 100644 --- a/Rakefile +++ b/Rakefile @@ -383,7 +383,11 @@ NATIVE_EXTS = [ Rake::ExtensionTask.new("datadog_profiling_loader.#{RUBY_VERSION}_#{RUBY_PLATFORM}") do |ext| ext.ext_dir = 'ext/datadog_profiling_loader' - end + end, + + Rake::ExtensionTask.new("libdatadog_ruby") do |ext| + ext.ext_dir = 'ext/libdatadog_ruby' + end, ].freeze NATIVE_CLEAN = ::Rake::FileList[] diff --git a/datadog.gemspec b/datadog.gemspec index da35de9ef1c..704c0f7151a 100644 --- a/datadog.gemspec +++ b/datadog.gemspec @@ -74,5 +74,5 @@ Gem::Specification.new do |spec| # (and yes we have a test for it) spec.add_dependency 'libdatadog', '~> 11.0.0.1.0' - spec.extensions = ['ext/datadog_profiling_native_extension/extconf.rb', 'ext/datadog_profiling_loader/extconf.rb'] + spec.extensions = ['ext/datadog_profiling_native_extension/extconf.rb', 'ext/datadog_profiling_loader/extconf.rb', 'libdatadog_ruby/extconf.rb'] end diff --git a/ext/libdatadog_ruby/extconf.rb b/ext/libdatadog_ruby/extconf.rb new file mode 100644 index 00000000000..a6e4da82681 --- /dev/null +++ b/ext/libdatadog_ruby/extconf.rb @@ -0,0 +1,17 @@ +# rubocop:disable Style/StderrPuts +# rubocop:disable Style/GlobalVars + +require 'mkmf' +require 'libdatadog' + +# If we got here, libdatadog is available and loaded +ENV['PKG_CONFIG_PATH'] = "#{ENV['PKG_CONFIG_PATH']}:#{Libdatadog.pkgconfig_folder}" +Logging.message("[datadog] PKG_CONFIG_PATH set to #{ENV['PKG_CONFIG_PATH'].inspect}\n") +$stderr.puts("Using libdatadog #{Libdatadog::VERSION} from #{Libdatadog.pkgconfig_folder}") + +unless pkg_config('datadog_profiling_with_rpath') + Logging.message("[datadog] Ruby detected the pkg-config command is #{$PKGCONFIG.inspect}\n") +end + +create_makefile("libdatadog_ruby") + diff --git a/ext/libdatadog_ruby/generate-swig.sh b/ext/libdatadog_ruby/generate-swig.sh new file mode 100755 index 00000000000..14ca4b4586d --- /dev/null +++ b/ext/libdatadog_ruby/generate-swig.sh @@ -0,0 +1 @@ +swig -I/home/ivo.anjo/datadog/libdatadog/build-linux/x86_64-linux/include -ruby libdatadog.i diff --git a/ext/libdatadog_ruby/libdatadog.i b/ext/libdatadog_ruby/libdatadog.i new file mode 100644 index 00000000000..d8713d1559e --- /dev/null +++ b/ext/libdatadog_ruby/libdatadog.i @@ -0,0 +1,22 @@ +%module libdatadog_ruby + +%{ + #include + #include +%} + +%typemap(in) uintptr_t { + $1 = (uintptr_t) NUM2ULONG($input); +} + +%typemap(in) uint64_t { + $1 = (uint64_t) NUM2ULONG($input); +} + +%typemap(out) struct ddog_Error* { + ddog_CharSlice char_slice = ddog_Error_message($1); + $result = rb_str_new(char_slice.ptr, char_slice.len); +} + +%include +%include diff --git a/ext/libdatadog_ruby/libdatadog_wrap.c b/ext/libdatadog_ruby/libdatadog_wrap.c new file mode 100644 index 00000000000..095be32b615 --- /dev/null +++ b/ext/libdatadog_ruby/libdatadog_wrap.c @@ -0,0 +1,15682 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.0 + * + * Do not make changes to this file unless you know what you are doing - modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +#define SWIG_VERSION 0x040200 +#define SWIGRUBY + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +#if __cplusplus >=201103L +# define SWIG_NULLPTR nullptr +#else +# define SWIG_NULLPTR NULL +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +#if __cplusplus >=201103L +# define SWIG_NULLPTR nullptr +#else +# define SWIG_NULLPTR NULL +#endif + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 +#define SWIG_POINTER_CLEAR 0x8 +#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN) + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows returning the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +/* Runtime errors are < 0 */ +#define SWIG_ERROR (-1) +/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */ +/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */ +/* Errors < -200 are generic runtime specific errors */ +#define SWIG_ERROR_RELEASE_NOT_OWNED (-200) + +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporary objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del object mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + +/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF + * if you're missing it. + */ +#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \ + (defined __cplusplus && __cplusplus >= 201103L) || \ + defined SWIG_HAVE_SNPRINTF) && \ + !defined SWIG_NO_SNPRINTF +# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A) +# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B) +#else +/* Fallback versions ignore the buffer size, but most of our uses either have a + * fixed maximum possible size or dynamically allocate a buffer that's large + * enough. + */ +# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A) +# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B) +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. Choose the last + name. It should be the most specific; a fully resolved name + but not necessarily with default template parameters expanded. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + +#if __GNUC__ >= 7 +#pragma GCC diagnostic push +#if defined(__cplusplus) +#pragma GCC diagnostic ignored "-Wregister" +#if __GNUC__ >= 10 +#pragma GCC diagnostic ignored "-Wvolatile" +#if __GNUC__ >= 11 +#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion" +#endif +#endif +#endif +#endif + +#include +#include /* For RUBY_API_VERSION_CODE */ + +#if __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif + +/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which + * breaks using rb_intern as an lvalue, as SWIG does. We work around this + * issue for now by disabling this. + * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645 + */ +#ifdef rb_intern +# undef rb_intern +#endif + +/* Remove global macros defined in Ruby's win32.h */ +#ifdef write +# undef write +#endif +#ifdef read +# undef read +#endif +#ifdef bind +# undef bind +#endif +#ifdef close +# undef close +#endif +#ifdef connect +# undef connect +#endif + + +/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ +#ifndef NUM2LL +#define NUM2LL(x) NUM2LONG((x)) +#endif +#ifndef LL2NUM +#define LL2NUM(x) INT2NUM((long) (x)) +#endif +#ifndef ULL2NUM +#define ULL2NUM(x) UINT2NUM((unsigned long) (x)) +#endif + +/* Ruby 1.7 doesn't (yet) define NUM2ULL() */ +#ifndef NUM2ULL +#ifdef HAVE_LONG_LONG +#define NUM2ULL(x) rb_num2ull((x)) +#else +#define NUM2ULL(x) NUM2ULONG(x) +#endif +#endif + +/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ +/* Define these for older versions so we can just write code the new way */ +#ifndef RSTRING_LEN +# define RSTRING_LEN(x) RSTRING(x)->len +#endif +#ifndef RSTRING_PTR +# define RSTRING_PTR(x) RSTRING(x)->ptr +#endif +#ifndef RSTRING_END +# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) +#endif +#ifndef RARRAY_LEN +# define RARRAY_LEN(x) RARRAY(x)->len +#endif +#ifndef RARRAY_PTR +# define RARRAY_PTR(x) RARRAY(x)->ptr +#endif +#ifndef RFLOAT_VALUE +# define RFLOAT_VALUE(x) RFLOAT(x)->value +#endif +#ifndef DOUBLE2NUM +# define DOUBLE2NUM(x) rb_float_new(x) +#endif +#ifndef RHASH_TBL +# define RHASH_TBL(x) (RHASH(x)->tbl) +#endif +#ifndef RHASH_ITER_LEV +# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) +#endif +#ifndef RHASH_IFNONE +# define RHASH_IFNONE(x) (RHASH(x)->ifnone) +#endif +#ifndef RHASH_SIZE +# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) +#endif +#ifndef RHASH_EMPTY_P +# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) +#endif +#ifndef RSTRUCT_LEN +# define RSTRUCT_LEN(x) RSTRUCT(x)->len +#endif +#ifndef RSTRUCT_PTR +# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr +#endif +#ifndef RTYPEDDATA_P +# define RTYPEDDATA_P(x) (TYPE(x) != T_DATA) +#endif + + + +/* + * The following macros are used for providing the correct type of a + * function pointer to the Ruby C API. + * + * Starting with Ruby 2.7 these macros act transparently due to Ruby's moving + * moving away from ANYARGS and instead employing strict function signatures. + * + * Note: In case of C (not C++) the macros are transparent even before + * Ruby 2.7 due to the fact that the Ruby C API used function declarators + * with empty parentheses, which allows for an unspecified number of + * arguments. + * + * PROTECTFUNC(f) is used for the function pointer argument of the Ruby + * C API function rb_protect(). + * + * VALUEFUNC(f) is used for the function pointer argument(s) of Ruby C API + * functions like rb_define_method() and rb_define_singleton_method(). + * + * VOIDFUNC(f) is used to typecast a C function that implements either + * the "mark" or "free" stuff for a Ruby Data object, so that it can be + * passed as an argument to Ruby C API functions like Data_Wrap_Struct() + * and Data_Make_Struct(). + * + * SWIG_RUBY_VOID_ANYARGS_FUNC(f) is used for the function pointer + * argument(s) of Ruby C API functions like rb_define_virtual_variable(). + * + * SWIG_RUBY_INT_ANYARGS_FUNC(f) is used for the function pointer + * argument(s) of Ruby C API functions like st_foreach(). + */ +#if defined(__cplusplus) && RUBY_API_VERSION_CODE < 20700 +# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) +# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f)) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f)) +#else +# define PROTECTFUNC(f) (f) +# define VALUEFUNC(f) (f) +# define VOIDFUNC(f) (f) +# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f) +# define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f) +#endif + +/* Don't use for expressions have side effect */ +#ifndef RB_STRING_VALUE +#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) +#endif +#ifndef StringValue +#define StringValue(s) RB_STRING_VALUE(s) +#endif +#ifndef StringValuePtr +#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) +#endif +#ifndef StringValueLen +#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) +#endif +#ifndef SafeStringValue +#define SafeStringValue(v) do {\ + StringValue(v);\ + rb_check_safe_str(v);\ +} while (0) +#endif + +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC +#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) +#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") +#endif + +static VALUE _mSWIG = Qnil; + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + + +/* Define some additional error types */ +#define SWIG_ObjectPreviouslyDeletedError -100 + + +/* Define custom exceptions for errors that do not map to existing Ruby + exceptions. Note this only works for C++ since a global cannot be + initialized by a function in C. For C, fallback to rb_eRuntimeError.*/ + +SWIGINTERN VALUE +getNullReferenceError(void) { + static int init = 0; + static VALUE rb_eNullReferenceError ; + if (!init) { + init = 1; + rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); + } + return rb_eNullReferenceError; +} + +SWIGINTERN VALUE +getObjectPreviouslyDeletedError(void) { + static int init = 0; + static VALUE rb_eObjectPreviouslyDeleted ; + if (!init) { + init = 1; + rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); + } + return rb_eObjectPreviouslyDeleted; +} + + +SWIGINTERN VALUE +SWIG_Ruby_ErrorType(int SWIG_code) { + VALUE type; + switch (SWIG_code) { + case SWIG_MemoryError: + type = rb_eNoMemError; + break; + case SWIG_IOError: + type = rb_eIOError; + break; + case SWIG_RuntimeError: + type = rb_eRuntimeError; + break; + case SWIG_IndexError: + type = rb_eIndexError; + break; + case SWIG_TypeError: + type = rb_eTypeError; + break; + case SWIG_DivisionByZero: + type = rb_eZeroDivError; + break; + case SWIG_OverflowError: + type = rb_eRangeError; + break; + case SWIG_SyntaxError: + type = rb_eSyntaxError; + break; + case SWIG_ValueError: + type = rb_eArgError; + break; + case SWIG_SystemError: + type = rb_eFatal; + break; + case SWIG_AttributeError: + type = rb_eRuntimeError; + break; + case SWIG_NullReferenceError: + type = getNullReferenceError(); + break; + case SWIG_ObjectPreviouslyDeletedError: + type = getObjectPreviouslyDeletedError(); + break; + case SWIG_UnknownError: + type = rb_eRuntimeError; + break; + default: + type = rb_eRuntimeError; + } + return type; +} + + +/* This function is called when a user inputs a wrong argument to + a method. + */ +SWIGINTERN +const char* Ruby_Format_TypeError( const char* msg, + const char* type, + const char* name, + const int argn, + VALUE input ) +{ + char buf[128]; + VALUE str; + VALUE asStr; + if ( msg && *msg ) + { + str = rb_str_new2(msg); + } + else + { + str = rb_str_new(NULL, 0); + } + + str = rb_str_cat2( str, "Expected argument " ); + SWIG_snprintf( buf, sizeof( buf), "%d of type ", argn-1 ); + str = rb_str_cat2( str, buf ); + str = rb_str_cat2( str, type ); + str = rb_str_cat2( str, ", but got " ); + str = rb_str_cat2( str, rb_obj_classname(input) ); + str = rb_str_cat2( str, " " ); + asStr = rb_inspect(input); + if ( RSTRING_LEN(asStr) > 30 ) + { + str = rb_str_cat( str, StringValuePtr(asStr), 30 ); + str = rb_str_cat2( str, "..." ); + } + else + { + str = rb_str_append( str, asStr ); + } + + if ( name ) + { + str = rb_str_cat2( str, "\n\tin SWIG method '" ); + str = rb_str_cat2( str, name ); + str = rb_str_cat2( str, "'" ); + } + + return StringValuePtr( str ); +} + +/* This function is called when an overloaded method fails */ +SWIGINTERN +void Ruby_Format_OverloadedError( + const int argc, + const int maxargs, + const char* method, + const char* prototypes + ) +{ + const char* msg = "Wrong # of arguments"; + if ( argc <= maxargs ) msg = "Wrong arguments"; + rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" + "Possible C/C++ prototypes are:\n%s", + msg, method, prototypes); +} + +/* ----------------------------------------------------------------------------- + * rubytracking.swg + * + * This file contains support for tracking mappings from + * Ruby objects to C++ objects. This functionality is needed + * to implement mark functions for Ruby's mark and sweep + * garbage collector. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(ST_DATA_T_DEFINED) +/* Needs to be explicitly included for Ruby 1.8 and earlier */ +#include +#endif + +/* Ruby 1.8 actually assumes the first case. */ +#if SIZEOF_VOIDP == SIZEOF_LONG +# define SWIG2NUM(v) LONG2NUM((unsigned long)v) +# define NUM2SWIG(x) (unsigned long)NUM2LONG(x) +#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG +# define SWIG2NUM(v) LL2NUM((unsigned long long)v) +# define NUM2SWIG(x) (unsigned long long)NUM2LL(x) +#else +# error sizeof(void*) is not the same as long or long long +#endif + +/* Global hash table to store Trackings from C/C++ + structs to Ruby Objects. +*/ +static st_table* swig_ruby_trackings = NULL; + +static VALUE swig_ruby_trackings_count(ID id, VALUE *var) { + return SWIG2NUM(swig_ruby_trackings->num_entries); +} + + +/* Setup a hash table to store Trackings */ +SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { + /* Create a hash table to store Trackings from C++ + objects to Ruby objects. */ + + /* Try to see if some other .so has already created a + tracking hash table, which we keep hidden in an instance var + in the SWIG module. + This is done to allow multiple DSOs to share the same + tracking table. + */ + VALUE trackings_value = Qnil; + /* change the variable name so that we can mix modules + compiled with older SWIG's - this used to be called "@__trackings__" */ + ID trackings_id = rb_intern( "@__safetrackings__" ); + VALUE verbose = rb_gv_get("VERBOSE"); + rb_gv_set("VERBOSE", Qfalse); + trackings_value = rb_ivar_get( _mSWIG, trackings_id ); + rb_gv_set("VERBOSE", verbose); + + /* The trick here is that we have to store the hash table + pointer in a Ruby variable. We do not want Ruby's GC to + treat this pointer as a Ruby object, so we convert it to + a Ruby numeric value. */ + if (trackings_value == Qnil) { + /* No, it hasn't. Create one ourselves */ + swig_ruby_trackings = st_init_numtable(); + rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) ); + } else { + swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value); + } + + rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", + VALUEFUNC(swig_ruby_trackings_count), + SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL)); +} + +/* Add a Tracking from a C/C++ struct to a Ruby object */ +SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { + /* Store the mapping to the global hash table. */ + st_insert(swig_ruby_trackings, (st_data_t)ptr, object); +} + +/* Get the Ruby object that owns the specified C/C++ struct */ +SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { + /* Now lookup the value stored in the global hash table */ + VALUE value; + + if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) { + return value; + } else { + return Qnil; + } +} + +/* Remove a Tracking from a C/C++ struct to a Ruby object. It + is very important to remove objects once they are destroyed + since the same memory address may be reused later to create + a new object. */ +SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { + /* Delete the object from the hash table */ + st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL); +} + +/* This is a helper method that unlinks a Ruby object from its + underlying C++ object. This is needed if the lifetime of the + Ruby object is longer than the C++ object. */ +SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { + VALUE object = SWIG_RubyInstanceFor(ptr); + + if (object != Qnil) { + // object might have the T_ZOMBIE type, but that's just + // because the GC has flagged it as such for a deferred + // destruction. Until then, it's still a T_DATA object. + DATA_PTR(object) = 0; + } +} + +/* This is a helper method that iterates over all the trackings + passing the C++ object pointer and its related Ruby object + to the passed callback function. */ + +/* Proxy method to abstract the internal trackings datatype */ +static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) { + ((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj); + return ST_CONTINUE; +} + +SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) { + st_foreach(swig_ruby_trackings, + SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback), + (st_data_t)meth); +} + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * Ruby API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGINTERN VALUE +SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { + if (NIL_P(target)) { + target = o; + } else { + if (TYPE(target) != T_ARRAY) { + VALUE o2 = target; + target = rb_ary_new(); + rb_ary_push(target, o2); + } + rb_ary_push(target, o); + } + return target; +} + +/* For ruby1.8.4 and earlier. */ +#ifndef RUBY_INIT_STACK + RUBY_EXTERN void Init_stack(VALUE* addr); +# define RUBY_INIT_STACK \ + VALUE variable_in_this_stack_frame; \ + Init_stack(&variable_in_this_stack_frame); +#endif + + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * rubyrun.swg + * + * This file contains the runtime support for Ruby modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) +#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) +#define swig_owntype swig_ruby_owntype + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) +#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg) +#define SWIG_fail goto fail + + +/* Ruby-specific SWIG API */ + +#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() +#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) +#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) +#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) +#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) + +#include "assert.h" + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + VALUE klass; + VALUE mImpl; + void (*mark)(void *); + void (*destroy)(void *); + int trackObjects; +} swig_class; + + +/* Global pointer used to keep some internal SWIG stuff */ +static VALUE _cSWIG_Pointer = Qnil; +static VALUE swig_runtime_data_type_pointer = Qnil; + +/* Global IDs used to keep some internal SWIG stuff */ +static ID swig_arity_id = 0; +static ID swig_call_id = 0; +static ID swig_lowerthan_id = 0; + +/* + If your swig extension is to be run within an embedded ruby and has + director callbacks, you should set -DRUBY_EMBEDDED during compilation. + This will reset ruby's stack frame on each entry point from the main + program the first time a virtual director function is invoked (in a + non-recursive way). + If this is not done, you run the risk of Ruby trashing the stack. +*/ + +#ifdef RUBY_EMBEDDED + +# define SWIG_INIT_STACK \ + if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ + ++swig_virtual_calls; +# define SWIG_RELEASE_STACK --swig_virtual_calls; +# define Ruby_DirectorTypeMismatchException(x) \ + rb_raise( rb_eTypeError, "%s", x ); return c_result; + + static unsigned int swig_virtual_calls = 0; + +#else /* normal non-embedded extension */ + +# define SWIG_INIT_STACK +# define SWIG_RELEASE_STACK +# define Ruby_DirectorTypeMismatchException(x) \ + throw Swig::DirectorTypeMismatchException( x ); + +#endif /* RUBY_EMBEDDED */ + + +SWIGRUNTIME VALUE +getExceptionClass(void) { + static int init = 0; + static VALUE rubyExceptionClass ; + if (!init) { + init = 1; + rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); + } + return rubyExceptionClass; +} + +/* This code checks to see if the Ruby object being raised as part + of an exception inherits from the Ruby class Exception. If so, + the object is simply returned. If not, then a new Ruby exception + object is created and that will be returned to Ruby.*/ +SWIGRUNTIME VALUE +SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { + VALUE exceptionClass = getExceptionClass(); + if (rb_obj_is_kind_of(obj, exceptionClass)) { + return obj; + } else { + return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); + } +} + +/* Initialize Ruby runtime support */ +SWIGRUNTIME void +SWIG_Ruby_InitRuntime(void) +{ + if (_mSWIG == Qnil) { + _mSWIG = rb_define_module("SWIG"); + swig_call_id = rb_intern("call"); + swig_arity_id = rb_intern("arity"); + swig_lowerthan_id = rb_intern("<"); + } +} + +/* Define Ruby class for C type */ +SWIGRUNTIME void +SWIG_Ruby_define_class(swig_type_info *type) +{ + size_t klass_len = 4 + strlen(type->name) + 1; + char *klass_name = (char *) malloc(klass_len); + SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name); + if (NIL_P(_cSWIG_Pointer)) { + _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); + rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); + } + rb_undef_alloc_func(rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer)); + free((void *) klass_name); +} + +/* Create a new pointer object */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) +{ + int own = flags & SWIG_POINTER_OWN; + int track; + char *klass_name; + swig_class *sklass; + VALUE klass; + VALUE obj; + + if (!ptr) + return Qnil; + + assert(type); + if (type->clientdata) { + sklass = (swig_class *) type->clientdata; + + /* Are we tracking this class and have we already returned this Ruby object? */ + track = sklass->trackObjects; + if (track) { + obj = SWIG_RubyInstanceFor(ptr); + + /* Check the object's type and make sure it has the correct type. + It might not in cases where methods do things like + downcast methods. */ + if (obj != Qnil) { + VALUE value = rb_iv_get(obj, "@__swigtype__"); + const char* type_name = RSTRING_PTR(value); + + if (strcmp(type->name, type_name) == 0) { + return obj; + } + } + } + + /* Create a new Ruby object */ + obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), + ( own ? VOIDFUNC(sklass->destroy) : + (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) + ), ptr); + + /* If tracking is on for this class then track this object. */ + if (track) { + SWIG_RubyAddTracking(ptr, obj); + } + } else { + size_t klass_len = 4 + strlen(type->name) + 1; + klass_name = (char *) malloc(klass_len); + SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name); + klass = rb_const_get(_mSWIG, rb_intern(klass_name)); + free((void *) klass_name); + obj = Data_Wrap_Struct(klass, 0, 0, ptr); + } + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + + return obj; +} + +/* Create a new class instance (always owned) */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) +{ + VALUE obj; + swig_class *sklass = (swig_class *) type->clientdata; + obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + return obj; +} + +/* Get type mangle from class name */ +SWIGRUNTIMEINLINE char * +SWIG_Ruby_MangleStr(VALUE obj) +{ + VALUE stype = rb_iv_get(obj, "@__swigtype__"); + if (NIL_P(stype)) + return NULL; + return StringValuePtr(stype); +} + +/* Acquire a pointer value */ +typedef struct { + void (*datafree)(void *); + int own; +} swig_ruby_owntype; + +SWIGRUNTIME swig_ruby_owntype +SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) { + swig_ruby_owntype oldown = {0, 0}; + if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) { + oldown.datafree = RDATA(obj)->dfree; + RDATA(obj)->dfree = own.datafree; + } + return oldown; +} + +/* Convert a pointer value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own) +{ + char *c; + swig_cast_info *tc; + void *vptr = 0; + + /* Grab the pointer */ + if (NIL_P(obj)) { + if (ptr) + *ptr = 0; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + } else { + if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) { + return SWIG_ERROR; + } + Data_Get_Struct(obj, void, vptr); + } + + if (own) { + own->datafree = RDATA(obj)->dfree; + own->own = 0; + } + + if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) { + if (!RDATA(obj)->dfree) + return SWIG_ERROR_RELEASE_NOT_OWNED; + } + + /* Check to see if the input object is giving up ownership + of the underlying C struct or C++ object. If so then we + need to reset the destructor since the Ruby object no + longer owns the underlying C++ object.*/ + if (flags & SWIG_POINTER_DISOWN) { + /* Is tracking on for this class? */ + int track = 0; + if (ty && ty->clientdata) { + swig_class *sklass = (swig_class *) ty->clientdata; + track = sklass->trackObjects; + } + + if (track) { + /* We are tracking objects for this class. Thus we change the destructor + * to SWIG_RubyRemoveTracking. This allows us to + * remove the mapping from the C++ to Ruby object + * when the Ruby object is garbage collected. If we don't + * do this, then it is possible we will return a reference + * to a Ruby object that no longer exists thereby crashing Ruby. */ + RDATA(obj)->dfree = SWIG_RubyRemoveTracking; + } else { + RDATA(obj)->dfree = 0; + } + } + + if (flags & SWIG_POINTER_CLEAR) { + DATA_PTR(obj) = 0; + } + + /* Do type-checking if type info was provided */ + if (ty) { + if (ty->clientdata) { + if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { + if (vptr == 0) { + /* The object has already been deleted */ + return SWIG_ObjectPreviouslyDeletedError; + } + } + } + if ((c = SWIG_MangleStr(obj)) == NULL) { + return SWIG_ERROR; + } + tc = SWIG_TypeCheck(c, ty); + if (!tc) { + return SWIG_ERROR; + } else { + if (ptr) { + if (tc->type == ty) { + *ptr = vptr; + } else { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc, vptr, &newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + own->own = own->own | SWIG_CAST_NEW_MEMORY; + } + } + } + } + } else { + if (ptr) + *ptr = vptr; + } + + return SWIG_OK; +} + +/* Check convert */ +SWIGRUNTIMEINLINE int +SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) +{ + char *c = SWIG_MangleStr(obj); + if (!c) return 0; + return SWIG_TypeCheck(c,ty) != 0; +} + +SWIGRUNTIME VALUE +SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; + *(r++) = '_'; + r = SWIG_PackData(r, ptr, sz); + strcpy(r, type->name); + return rb_str_new2(result); +} + +/* Convert a packed pointer value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c; + + if (TYPE(obj) != T_STRING) goto type_error; + c = StringValuePtr(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') goto type_error; + c++; + c = SWIG_UnpackData(c, ptr, sz); + if (ty) { + tc = SWIG_TypeCheck(c, ty); + if (!tc) goto type_error; + } + return SWIG_OK; + + type_error: + return SWIG_ERROR; +} + +SWIGRUNTIME swig_module_info * +SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) +{ + VALUE pointer; + swig_module_info *ret = 0; + VALUE verbose = rb_gv_get("VERBOSE"); + + /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ + rb_gv_set("VERBOSE", Qfalse); + + /* first check if pointer already created */ + pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + if (pointer != Qnil) { + Data_Get_Struct(pointer, swig_module_info, ret); + } + + /* reinstate warnings */ + rb_gv_set("VERBOSE", verbose); + return ret; +} + +SWIGRUNTIME void +SWIG_Ruby_SetModule(swig_module_info *pointer) +{ + /* register a new class */ + VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); + rb_undef_alloc_func(cl); + /* create and store the structure pointer to a global variable */ + swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); + rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); +} + +/* This function can be used to check whether a proc or method or similarly + callable function has been passed. Usually used in a %typecheck, like: + + %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { + $result = SWIG_Ruby_isCallable( $input ); + } + */ +SWIGINTERN +int SWIG_Ruby_isCallable( VALUE proc ) +{ + if ( rb_respond_to( proc, swig_call_id ) ) + return 1; + return 0; +} + +/* This function can be used to check the arity (number of arguments) + a proc or method can take. Usually used in a %typecheck. + Valid arities will be that equal to minimal or those < 0 + which indicate a variable number of parameters at the end. + */ +SWIGINTERN +int SWIG_Ruby_arity( VALUE proc, int minimal ) +{ + if ( rb_respond_to( proc, swig_arity_id ) ) + { + VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 ); + int arity = NUM2INT(num); + if ( arity < 0 && (arity+1) < -minimal ) return 1; + if ( arity == minimal ) return 1; + return 1; + } + return 0; +} + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0) + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_char swig_types[0] +#define SWIGTYPE_p_ddog_CancellationToken swig_types[1] +#define SWIGTYPE_p_ddog_ConfigurationOrigin swig_types[2] +#define SWIGTYPE_p_ddog_ContextKey swig_types[3] +#define SWIGTYPE_p_ddog_Endpoint swig_types[4] +#define SWIGTYPE_p_ddog_Error swig_types[5] +#define SWIGTYPE_p_ddog_HttpStatus swig_types[6] +#define SWIGTYPE_p_ddog_LogLevel swig_types[7] +#define SWIGTYPE_p_ddog_MetricNamespace swig_types[8] +#define SWIGTYPE_p_ddog_MetricType swig_types[9] +#define SWIGTYPE_p_ddog_Option_Bool swig_types[10] +#define SWIGTYPE_p_ddog_Option_Bool_Tag swig_types[11] +#define SWIGTYPE_p_ddog_Option_Error swig_types[12] +#define SWIGTYPE_p_ddog_Option_Error_Tag swig_types[13] +#define SWIGTYPE_p_ddog_Slice_CChar swig_types[14] +#define SWIGTYPE_p_ddog_Slice_I64 swig_types[15] +#define SWIGTYPE_p_ddog_Slice_U8 swig_types[16] +#define SWIGTYPE_p_ddog_StringWrapper swig_types[17] +#define SWIGTYPE_p_ddog_Tag swig_types[18] +#define SWIGTYPE_p_ddog_TelemetryWorkerBuilder swig_types[19] +#define SWIGTYPE_p_ddog_TelemetryWorkerBuilderBoolProperty swig_types[20] +#define SWIGTYPE_p_ddog_TelemetryWorkerBuilderEndpointProperty swig_types[21] +#define SWIGTYPE_p_ddog_TelemetryWorkerBuilderStrProperty swig_types[22] +#define SWIGTYPE_p_ddog_TelemetryWorkerHandle swig_types[23] +#define SWIGTYPE_p_ddog_Timespec swig_types[24] +#define SWIGTYPE_p_ddog_Vec_Tag swig_types[25] +#define SWIGTYPE_p_ddog_Vec_Tag_ParseResult swig_types[26] +#define SWIGTYPE_p_ddog_Vec_Tag_PushResult swig_types[27] +#define SWIGTYPE_p_ddog_Vec_Tag_PushResult_Tag swig_types[28] +#define SWIGTYPE_p_ddog_Vec_U8 swig_types[29] +#define SWIGTYPE_p_ddog_prof_CrashInfo swig_types[30] +#define SWIGTYPE_p_ddog_prof_CrashInfoNewResult swig_types[31] +#define SWIGTYPE_p_ddog_prof_CrashInfoNewResult_Tag swig_types[32] +#define SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration swig_types[33] +#define SWIGTYPE_p_ddog_prof_CrashtrackerMetadata swig_types[34] +#define SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig swig_types[35] +#define SWIGTYPE_p_ddog_prof_CrashtrackerResult swig_types[36] +#define SWIGTYPE_p_ddog_prof_CrashtrackerResult_Tag swig_types[37] +#define SWIGTYPE_p_ddog_prof_DemangleOptions swig_types[38] +#define SWIGTYPE_p_ddog_prof_EncodedProfile swig_types[39] +#define SWIGTYPE_p_ddog_prof_Endpoint swig_types[40] +#define SWIGTYPE_p_ddog_prof_Endpoint_Tag swig_types[41] +#define SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body swig_types[42] +#define SWIGTYPE_p_ddog_prof_EnvVar swig_types[43] +#define SWIGTYPE_p_ddog_prof_Exporter swig_types[44] +#define SWIGTYPE_p_ddog_prof_Exporter_File swig_types[45] +#define SWIGTYPE_p_ddog_prof_Exporter_NewResult swig_types[46] +#define SWIGTYPE_p_ddog_prof_Exporter_NewResult_Tag swig_types[47] +#define SWIGTYPE_p_ddog_prof_Exporter_Request swig_types[48] +#define SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult swig_types[49] +#define SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult_Tag swig_types[50] +#define SWIGTYPE_p_ddog_prof_Exporter_SendResult swig_types[51] +#define SWIGTYPE_p_ddog_prof_Exporter_SendResult_Tag swig_types[52] +#define SWIGTYPE_p_ddog_prof_Exporter_Slice_File swig_types[53] +#define SWIGTYPE_p_ddog_prof_Function swig_types[54] +#define SWIGTYPE_p_ddog_prof_Label swig_types[55] +#define SWIGTYPE_p_ddog_prof_Location swig_types[56] +#define SWIGTYPE_p_ddog_prof_Mapping swig_types[57] +#define SWIGTYPE_p_ddog_prof_NormalizedAddress swig_types[58] +#define SWIGTYPE_p_ddog_prof_NormalizedAddressTypes swig_types[59] +#define SWIGTYPE_p_ddog_prof_Option_U32 swig_types[60] +#define SWIGTYPE_p_ddog_prof_Option_U32_Tag swig_types[61] +#define SWIGTYPE_p_ddog_prof_Period swig_types[62] +#define SWIGTYPE_p_ddog_prof_Profile swig_types[63] +#define SWIGTYPE_p_ddog_prof_Profile_NewResult swig_types[64] +#define SWIGTYPE_p_ddog_prof_Profile_NewResult_Tag swig_types[65] +#define SWIGTYPE_p_ddog_prof_Profile_Result swig_types[66] +#define SWIGTYPE_p_ddog_prof_Profile_Result_Tag swig_types[67] +#define SWIGTYPE_p_ddog_prof_Profile_SerializeResult swig_types[68] +#define SWIGTYPE_p_ddog_prof_Profile_SerializeResult_Tag swig_types[69] +#define SWIGTYPE_p_ddog_prof_ProfiledEndpointsStats swig_types[70] +#define SWIGTYPE_p_ddog_prof_ProfilingOpTypes swig_types[71] +#define SWIGTYPE_p_ddog_prof_Sample swig_types[72] +#define SWIGTYPE_p_ddog_prof_SigInfo swig_types[73] +#define SWIGTYPE_p_ddog_prof_Slice_CharSlice swig_types[74] +#define SWIGTYPE_p_ddog_prof_Slice_EnvVar swig_types[75] +#define SWIGTYPE_p_ddog_prof_Slice_Label swig_types[76] +#define SWIGTYPE_p_ddog_prof_Slice_Location swig_types[77] +#define SWIGTYPE_p_ddog_prof_Slice_StackFrame swig_types[78] +#define SWIGTYPE_p_ddog_prof_Slice_StackFrameNames swig_types[79] +#define SWIGTYPE_p_ddog_prof_Slice_Usize swig_types[80] +#define SWIGTYPE_p_ddog_prof_Slice_ValueType swig_types[81] +#define SWIGTYPE_p_ddog_prof_StackFrame swig_types[82] +#define SWIGTYPE_p_ddog_prof_StackFrameNames swig_types[83] +#define SWIGTYPE_p_ddog_prof_StacktraceCollection swig_types[84] +#define SWIGTYPE_p_ddog_prof_StringWrapper swig_types[85] +#define SWIGTYPE_p_ddog_prof_StringWrapperResult swig_types[86] +#define SWIGTYPE_p_ddog_prof_StringWrapperResult_Tag swig_types[87] +#define SWIGTYPE_p_ddog_prof_ValueType swig_types[88] +#define SWIGTYPE_p_int64_t swig_types[89] +#define SWIGTYPE_p_p_ddog_Endpoint swig_types[90] +#define SWIGTYPE_p_p_ddog_prof_Exporter_Request swig_types[91] +#define SWIGTYPE_p_uint16_t swig_types[92] +#define SWIGTYPE_p_uint32_t swig_types[93] +#define SWIGTYPE_p_uint64_t swig_types[94] +#define SWIGTYPE_p_uint8_t swig_types[95] +#define SWIGTYPE_p_uintptr_t swig_types[96] +static swig_type_info *swig_types[98]; +static swig_module_info swig_module = {swig_types, 97, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#define SWIG_init Init_libdatadog_ruby +#define SWIG_name "Libdatadog_ruby" + +static VALUE mLibdatadog_ruby; + +#define SWIG_RUBY_THREAD_BEGIN_BLOCK +#define SWIG_RUBY_THREAD_END_BLOCK + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + + #include + #include + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) +{ + if (TYPE(obj) == T_STRING) { + char *cstr = StringValuePtr(obj); + size_t size = RSTRING_LEN(obj) + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *)vptr; + if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > LONG_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil; + } else { + return rb_str_new(carray, (long)(size)); + } + } else { + return Qnil; + } +} + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + + #define SWIG_From_long LONG2NUM + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERN VALUE +SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2)) +{ + return Qnil; +} + + +/*@SWIG:/usr/share/swig4.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg) +{ + VALUE *args = (VALUE *)arg; + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long *res = (long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long (VALUE obj, long* val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (VALUE obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +SWIGINTERN int +SWIG_AsVal_bool (VALUE obj, bool *val) +{ + if (obj == Qtrue) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Qfalse) { + if (val) *val = false; + return SWIG_OK; + } else { + int res = 0; + if (SWIG_AsVal_int (obj, &res) == SWIG_OK) { + if (val) *val = res ? true : false; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERNINLINE VALUE +SWIG_From_bool (bool value) +{ + return value ? Qtrue : Qfalse; +} + +static swig_class SwigClassDdog_Vec_U8; + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + uint8_t *arg2 = (uint8_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","ptr", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_uint8_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint8_t const *","ptr", 2, argv[0] )); + } + arg2 = (uint8_t *)(argp2); + if (arg1) (arg1)->ptr = (uint8_t const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint8_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","ptr", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + result = (uint8_t *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint8_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","len", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","len", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_capacity_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","capacity", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->capacity = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_capacity_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","capacity", 1, self )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + result = ((arg1)->capacity); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Vec_U8_allocate(VALUE self) +#else +_wrap_ddog_Vec_U8_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Vec_U8); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Vec_U8(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Vec_U8 *)calloc(1, sizeof(struct ddog_Vec_U8)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Vec_U8(void *self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Error; + +SWIGINTERN VALUE +_wrap_ddog_Error_message_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Error *arg1 = (struct ddog_Error *) 0 ; + struct ddog_Vec_U8 *arg2 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Error *","message", 1, self )); + } + arg1 = (struct ddog_Error *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","message", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_U8 *)(argp2); + if (arg1) (arg1)->message = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Error_message_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Error *arg1 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_U8 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Error *","message", 1, self )); + } + arg1 = (struct ddog_Error *)(argp1); + result = (struct ddog_Vec_U8 *)& ((arg1)->message); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Error_allocate(VALUE self) +#else +_wrap_ddog_Error_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Error); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Error(int argc, VALUE *argv, VALUE self) { + struct ddog_Error *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Error *)calloc(1, sizeof(struct ddog_Error)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Error(void *self) { + struct ddog_Error *arg1 = (struct ddog_Error *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Slice_CChar; + +SWIGINTERN VALUE +_wrap_ddog_Slice_CChar_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_CChar *arg1 = (struct ddog_Slice_CChar *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_CChar *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_CChar *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","ptr", 2, argv[0] )); + } + arg2 = (char *)(buf2); + if (arg2) { + size_t size = strlen((const char *)((const char *)(arg2))) + 1; + arg1->ptr = (char const *)(char *)memcpy(malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->ptr = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_CChar_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_CChar *arg1 = (struct ddog_Slice_CChar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_CChar *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_CChar *)(argp1); + result = (char *) ((arg1)->ptr); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_CChar_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_CChar *arg1 = (struct ddog_Slice_CChar *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_CChar *","len", 1, self )); + } + arg1 = (struct ddog_Slice_CChar *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_CChar_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_CChar *arg1 = (struct ddog_Slice_CChar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_CChar *","len", 1, self )); + } + arg1 = (struct ddog_Slice_CChar *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Slice_CChar_allocate(VALUE self) +#else +_wrap_ddog_Slice_CChar_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Slice_CChar); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Slice_CChar(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_CChar *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Slice_CChar *)calloc(1, sizeof(struct ddog_Slice_CChar)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Slice_CChar(void *self) { + struct ddog_Slice_CChar *arg1 = (struct ddog_Slice_CChar *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Option_Error; + +SWIGINTERN VALUE +_wrap_ddog_Option_Error_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Error *arg1 = (struct ddog_Option_Error *) 0 ; + ddog_Option_Error_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Error *","tag", 1, self )); + } + arg1 = (struct ddog_Option_Error *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_Option_Error_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_Option_Error_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Error_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Error *arg1 = (struct ddog_Option_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_Option_Error_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Error *","tag", 1, self )); + } + arg1 = (struct ddog_Option_Error *)(argp1); + result = (ddog_Option_Error_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Error_some_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Error *arg1 = (struct ddog_Option_Error *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Error *","some", 1, self )); + } + arg1 = (struct ddog_Option_Error *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","some", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->some = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Error_some_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Error *arg1 = (struct ddog_Option_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Error *","some", 1, self )); + } + arg1 = (struct ddog_Option_Error *)(argp1); + result = (struct ddog_Error *)& ((arg1)->some); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Option_Error_allocate(VALUE self) +#else +_wrap_ddog_Option_Error_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Option_Error); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Option_Error(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Error *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Option_Error *)calloc(1, sizeof(struct ddog_Option_Error)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Option_Error(void *self) { + struct ddog_Option_Error *arg1 = (struct ddog_Option_Error *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_StringWrapper; + +SWIGINTERN VALUE +_wrap_ddog_StringWrapper_message_set(int argc, VALUE *argv, VALUE self) { + struct ddog_StringWrapper *arg1 = (struct ddog_StringWrapper *) 0 ; + struct ddog_Vec_U8 *arg2 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_StringWrapper *","message", 1, self )); + } + arg1 = (struct ddog_StringWrapper *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","message", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_U8 *)(argp2); + if (arg1) (arg1)->message = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_StringWrapper_message_get(int argc, VALUE *argv, VALUE self) { + struct ddog_StringWrapper *arg1 = (struct ddog_StringWrapper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_U8 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_StringWrapper *","message", 1, self )); + } + arg1 = (struct ddog_StringWrapper *)(argp1); + result = (struct ddog_Vec_U8 *)& ((arg1)->message); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_StringWrapper_allocate(VALUE self) +#else +_wrap_ddog_StringWrapper_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_StringWrapper); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_StringWrapper(int argc, VALUE *argv, VALUE self) { + struct ddog_StringWrapper *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_StringWrapper *)calloc(1, sizeof(struct ddog_StringWrapper)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_StringWrapper(void *self) { + struct ddog_StringWrapper *arg1 = (struct ddog_StringWrapper *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Vec_Tag; + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + struct ddog_Tag *arg2 = (struct ddog_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","ptr", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Tag, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Tag const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_Tag *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_Tag const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Tag *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","ptr", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + result = (struct ddog_Tag *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Tag, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","len", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","len", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_capacity_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","capacity", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->capacity = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_capacity_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","capacity", 1, self )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + result = ((arg1)->capacity); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Vec_Tag_allocate(VALUE self) +#else +_wrap_ddog_Vec_Tag_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Vec_Tag); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Vec_Tag(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Vec_Tag *)calloc(1, sizeof(struct ddog_Vec_Tag)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Vec_Tag(void *self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Vec_Tag_PushResult; + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_PushResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_PushResult *arg1 = (struct ddog_Vec_Tag_PushResult *) 0 ; + ddog_Vec_Tag_PushResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_PushResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_PushResult *","tag", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_PushResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_Vec_Tag_PushResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_Vec_Tag_PushResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_PushResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_PushResult *arg1 = (struct ddog_Vec_Tag_PushResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_Vec_Tag_PushResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_PushResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_PushResult *","tag", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_PushResult *)(argp1); + result = (ddog_Vec_Tag_PushResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_PushResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_PushResult *arg1 = (struct ddog_Vec_Tag_PushResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_PushResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_PushResult *","err", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_PushResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_PushResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_PushResult *arg1 = (struct ddog_Vec_Tag_PushResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_PushResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_PushResult *","err", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_PushResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Vec_Tag_PushResult_allocate(VALUE self) +#else +_wrap_ddog_Vec_Tag_PushResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Vec_Tag_PushResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Vec_Tag_PushResult(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_PushResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Vec_Tag_PushResult *)calloc(1, sizeof(struct ddog_Vec_Tag_PushResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Vec_Tag_PushResult(void *self) { + struct ddog_Vec_Tag_PushResult *arg1 = (struct ddog_Vec_Tag_PushResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Vec_Tag_ParseResult; + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ParseResult_tags_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_ParseResult *arg1 = (struct ddog_Vec_Tag_ParseResult *) 0 ; + struct ddog_Vec_Tag *arg2 = (struct ddog_Vec_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_ParseResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_ParseResult *","tags", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_ParseResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","tags", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_Tag *)(argp2); + if (arg1) (arg1)->tags = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ParseResult_tags_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_ParseResult *arg1 = (struct ddog_Vec_Tag_ParseResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_Tag *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_ParseResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_ParseResult *","tags", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_ParseResult *)(argp1); + result = (struct ddog_Vec_Tag *)& ((arg1)->tags); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ParseResult_error_message_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_ParseResult *arg1 = (struct ddog_Vec_Tag_ParseResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_ParseResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_ParseResult *","error_message", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_ParseResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","error_message", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->error_message = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_ParseResult_error_message_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_ParseResult *arg1 = (struct ddog_Vec_Tag_ParseResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Vec_Tag_ParseResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag_ParseResult *","error_message", 1, self )); + } + arg1 = (struct ddog_Vec_Tag_ParseResult *)(argp1); + result = (struct ddog_Error *) ((arg1)->error_message); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Vec_Tag_ParseResult_allocate(VALUE self) +#else +_wrap_ddog_Vec_Tag_ParseResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Vec_Tag_ParseResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Vec_Tag_ParseResult(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag_ParseResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Vec_Tag_ParseResult *)calloc(1, sizeof(struct ddog_Vec_Tag_ParseResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Vec_Tag_ParseResult(void *self) { + struct ddog_Vec_Tag_ParseResult *arg1 = (struct ddog_Vec_Tag_ParseResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashtrackerResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + ddog_prof_CrashtrackerResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_CrashtrackerResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_CrashtrackerResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_CrashtrackerResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + result = (ddog_prof_CrashtrackerResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","ok", 2, argv[0] )); + } + arg2 = (bool)(val2); + if (arg1) (arg1)->ok = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + result = (bool) ((arg1)->ok); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashtrackerResult_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashtrackerResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashtrackerResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashtrackerResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashtrackerResult *)calloc(1, sizeof(struct ddog_prof_CrashtrackerResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashtrackerResult(void *self) { + struct ddog_prof_CrashtrackerResult *arg1 = (struct ddog_prof_CrashtrackerResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_CharSlice; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_CharSlice_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_CharSlice *arg1 = (struct ddog_prof_Slice_CharSlice *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_CharSlice *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice const *","ptr", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->ptr = (ddog_CharSlice const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_CharSlice_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_CharSlice *arg1 = (struct ddog_prof_Slice_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_CharSlice *)(argp1); + result = (ddog_CharSlice *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_CharSlice_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_CharSlice *arg1 = (struct ddog_prof_Slice_CharSlice *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_CharSlice *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_CharSlice_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_CharSlice *arg1 = (struct ddog_prof_Slice_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_CharSlice *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_CharSlice_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_CharSlice_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_CharSlice); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_CharSlice(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_CharSlice *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_CharSlice *)calloc(1, sizeof(struct ddog_prof_Slice_CharSlice)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_CharSlice(void *self) { + struct ddog_prof_Slice_CharSlice *arg1 = (struct ddog_prof_Slice_CharSlice *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body; + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__0_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *","_0", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","_0", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->_0 = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__0_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *","_0", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->_0); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__1_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *","_1", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","_1", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->_1 = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__1_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *","_1", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->_1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body_allocate(VALUE self) +#else +_wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Endpoint_ddog_prof_Agentless_Body(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)calloc(1, sizeof(struct ddog_prof_Endpoint_ddog_prof_Agentless_Body)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Endpoint_ddog_prof_Agentless_Body(void *self) { + struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg1 = (struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Endpoint; + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + ddog_prof_Endpoint_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Endpoint_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Endpoint_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Endpoint_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + result = (ddog_prof_Endpoint_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_agent_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","agent", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","agent", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->agent = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_agent_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","agent", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->agent); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_AGENTLESS_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + ddog_prof_Endpoint_ddog_prof_Agentless_Body *arg2 = (ddog_prof_Endpoint_ddog_prof_Agentless_Body *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","AGENTLESS", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_prof_Endpoint_ddog_prof_Agentless_Body *","AGENTLESS", 2, argv[0] )); + } + arg2 = (ddog_prof_Endpoint_ddog_prof_Agentless_Body *)(argp2); + if (arg1) (arg1)->AGENTLESS = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_AGENTLESS_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Endpoint_ddog_prof_Agentless_Body *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","AGENTLESS", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + result = (ddog_prof_Endpoint_ddog_prof_Agentless_Body *)& ((arg1)->AGENTLESS); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_file_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","file", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","file", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->file = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_file_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","file", 1, self )); + } + arg1 = (struct ddog_prof_Endpoint *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->file); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Endpoint_allocate(VALUE self) +#else +_wrap_ddog_prof_Endpoint_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Endpoint); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Endpoint(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Endpoint *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Endpoint *)calloc(1, sizeof(struct ddog_prof_Endpoint)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Endpoint(void *self) { + struct ddog_prof_Endpoint *arg1 = (struct ddog_prof_Endpoint *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashtrackerConfiguration; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_additional_files_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + struct ddog_prof_Slice_CharSlice *arg2 = (struct ddog_prof_Slice_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","additional_files", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","additional_files", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_CharSlice *)(argp2); + if (arg1) (arg1)->additional_files = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_additional_files_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","additional_files", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = (struct ddog_prof_Slice_CharSlice *)& ((arg1)->additional_files); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_create_alt_stack_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","create_alt_stack", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","create_alt_stack", 2, argv[0] )); + } + arg2 = (bool)(val2); + if (arg1) (arg1)->create_alt_stack = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_create_alt_stack_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","create_alt_stack", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = (bool) ((arg1)->create_alt_stack); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_endpoint_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + struct ddog_prof_Endpoint *arg2 = (struct ddog_prof_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","endpoint", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint *","endpoint", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Endpoint *)(argp2); + if (arg1) (arg1)->endpoint = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_endpoint_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Endpoint *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","endpoint", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = (struct ddog_prof_Endpoint *)& ((arg1)->endpoint); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Endpoint, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_resolve_frames_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + enum ddog_prof_StacktraceCollection arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","resolve_frames", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "enum ddog_prof_StacktraceCollection","resolve_frames", 2, argv[0] )); + } + arg2 = (enum ddog_prof_StacktraceCollection)(val2); + if (arg1) (arg1)->resolve_frames = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_resolve_frames_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + enum ddog_prof_StacktraceCollection result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","resolve_frames", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = (enum ddog_prof_StacktraceCollection) ((arg1)->resolve_frames); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_timeout_secs_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","timeout_secs", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->timeout_secs = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_timeout_secs_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","timeout_secs", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = ((arg1)->timeout_secs); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_wait_for_receiver_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","wait_for_receiver", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","wait_for_receiver", 2, argv[0] )); + } + arg2 = (bool)(val2); + if (arg1) (arg1)->wait_for_receiver = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerConfiguration_wait_for_receiver_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration *","wait_for_receiver", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerConfiguration *)(argp1); + result = (bool) ((arg1)->wait_for_receiver); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashtrackerConfiguration_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashtrackerConfiguration_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashtrackerConfiguration(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashtrackerConfiguration *)calloc(1, sizeof(struct ddog_prof_CrashtrackerConfiguration)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashtrackerConfiguration(void *self) { + struct ddog_prof_CrashtrackerConfiguration *arg1 = (struct ddog_prof_CrashtrackerConfiguration *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_EnvVar; + +SWIGINTERN VALUE +_wrap_ddog_prof_EnvVar_key_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EnvVar *arg1 = (struct ddog_prof_EnvVar *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EnvVar *","key", 1, self )); + } + arg1 = (struct ddog_prof_EnvVar *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","key", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->key = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EnvVar_key_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EnvVar *arg1 = (struct ddog_prof_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EnvVar *","key", 1, self )); + } + arg1 = (struct ddog_prof_EnvVar *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->key); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EnvVar_val_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EnvVar *arg1 = (struct ddog_prof_EnvVar *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EnvVar *","val", 1, self )); + } + arg1 = (struct ddog_prof_EnvVar *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","val", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->val = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EnvVar_val_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EnvVar *arg1 = (struct ddog_prof_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EnvVar *","val", 1, self )); + } + arg1 = (struct ddog_prof_EnvVar *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->val); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_EnvVar_allocate(VALUE self) +#else +_wrap_ddog_prof_EnvVar_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_EnvVar); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_EnvVar(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EnvVar *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_EnvVar *)calloc(1, sizeof(struct ddog_prof_EnvVar)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_EnvVar(void *self) { + struct ddog_prof_EnvVar *arg1 = (struct ddog_prof_EnvVar *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_EnvVar; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_EnvVar_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_EnvVar *arg1 = (struct ddog_prof_Slice_EnvVar *) 0 ; + struct ddog_prof_EnvVar *arg2 = (struct ddog_prof_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_EnvVar *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_EnvVar *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_EnvVar, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_EnvVar const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_EnvVar *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_EnvVar const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_EnvVar_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_EnvVar *arg1 = (struct ddog_prof_Slice_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_EnvVar *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_EnvVar *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_EnvVar *)(argp1); + result = (struct ddog_prof_EnvVar *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_EnvVar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_EnvVar_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_EnvVar *arg1 = (struct ddog_prof_Slice_EnvVar *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_EnvVar *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_EnvVar *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_EnvVar_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_EnvVar *arg1 = (struct ddog_prof_Slice_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_EnvVar *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_EnvVar *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_EnvVar_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_EnvVar_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_EnvVar); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_EnvVar(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_EnvVar *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_EnvVar *)calloc(1, sizeof(struct ddog_prof_Slice_EnvVar)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_EnvVar(void *self) { + struct ddog_prof_Slice_EnvVar *arg1 = (struct ddog_prof_Slice_EnvVar *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashtrackerReceiverConfig; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_args_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + struct ddog_prof_Slice_CharSlice *arg2 = (struct ddog_prof_Slice_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","args", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_CharSlice *","args", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_CharSlice *)(argp2); + if (arg1) (arg1)->args = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_args_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","args", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + result = (struct ddog_prof_Slice_CharSlice *)& ((arg1)->args); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_CharSlice, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_env_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + struct ddog_prof_Slice_EnvVar *arg2 = (struct ddog_prof_Slice_EnvVar *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","env", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_EnvVar *","env", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_EnvVar *)(argp2); + if (arg1) (arg1)->env = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_env_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_EnvVar *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","env", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + result = (struct ddog_prof_Slice_EnvVar *)& ((arg1)->env); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_EnvVar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_path_to_receiver_binary_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","path_to_receiver_binary", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","path_to_receiver_binary", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->path_to_receiver_binary = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_path_to_receiver_binary_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","path_to_receiver_binary", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->path_to_receiver_binary); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stderr_filename_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","optional_stderr_filename", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","optional_stderr_filename", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->optional_stderr_filename = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stderr_filename_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","optional_stderr_filename", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->optional_stderr_filename); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stdout_filename_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","optional_stdout_filename", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","optional_stdout_filename", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->optional_stdout_filename = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stdout_filename_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig *","optional_stdout_filename", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->optional_stdout_filename); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashtrackerReceiverConfig_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashtrackerReceiverConfig_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashtrackerReceiverConfig(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerReceiverConfig *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashtrackerReceiverConfig *)calloc(1, sizeof(struct ddog_prof_CrashtrackerReceiverConfig)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashtrackerReceiverConfig(void *self) { + struct ddog_prof_CrashtrackerReceiverConfig *arg1 = (struct ddog_prof_CrashtrackerReceiverConfig *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashtrackerMetadata; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_profiling_library_name_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","profiling_library_name", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","profiling_library_name", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->profiling_library_name = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_profiling_library_name_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","profiling_library_name", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->profiling_library_name); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_profiling_library_version_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","profiling_library_version", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","profiling_library_version", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->profiling_library_version = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_profiling_library_version_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","profiling_library_version", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->profiling_library_version); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_family_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","family", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","family", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->family = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_family_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","family", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->family); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_tags_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + struct ddog_Vec_Tag *arg2 = (struct ddog_Vec_Tag *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","tags", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_Tag, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag const *","tags", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_Tag *)(argp2); + if (arg1) (arg1)->tags = (struct ddog_Vec_Tag const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashtrackerMetadata_tags_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_Tag *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata *","tags", 1, self )); + } + arg1 = (struct ddog_prof_CrashtrackerMetadata *)(argp1); + result = (struct ddog_Vec_Tag *) ((arg1)->tags); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashtrackerMetadata_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashtrackerMetadata_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashtrackerMetadata); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashtrackerMetadata(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerMetadata *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashtrackerMetadata *)calloc(1, sizeof(struct ddog_prof_CrashtrackerMetadata)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashtrackerMetadata(void *self) { + struct ddog_prof_CrashtrackerMetadata *arg1 = (struct ddog_prof_CrashtrackerMetadata *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashInfo; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfo_inner_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + struct ddog_prof_CrashInfo *arg2 = (struct ddog_prof_CrashInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","inner", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_CrashInfo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","inner", 2, argv[0] )); + } + arg2 = (struct ddog_prof_CrashInfo *)(argp2); + if (arg1) (arg1)->inner = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfo_inner_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_CrashInfo *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","inner", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + result = (struct ddog_prof_CrashInfo *) ((arg1)->inner); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashInfo_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashInfo_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashInfo); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashInfo(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashInfo *)calloc(1, sizeof(struct ddog_prof_CrashInfo)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashInfo(void *self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_CrashInfoNewResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + ddog_prof_CrashInfoNewResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_CrashInfoNewResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_CrashInfoNewResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_CrashInfoNewResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + result = (ddog_prof_CrashInfoNewResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + struct ddog_prof_CrashInfo *arg2 = (struct ddog_prof_CrashInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_CrashInfo *)(argp2); + if (arg1) (arg1)->ok = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_CrashInfo *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + result = (struct ddog_prof_CrashInfo *)& ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_CrashInfoNewResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_CrashInfoNewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfoNewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_CrashInfoNewResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_CrashInfoNewResult_allocate(VALUE self) +#else +_wrap_ddog_prof_CrashInfoNewResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_CrashInfoNewResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_CrashInfoNewResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_CrashInfoNewResult *)calloc(1, sizeof(struct ddog_prof_CrashInfoNewResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_CrashInfoNewResult(void *self) { + struct ddog_prof_CrashInfoNewResult *arg1 = (struct ddog_prof_CrashInfoNewResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_SigInfo; + +SWIGINTERN VALUE +_wrap_ddog_prof_SigInfo_signum_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_SigInfo *arg1 = (struct ddog_prof_SigInfo *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_SigInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_SigInfo *","signum", 1, self )); + } + arg1 = (struct ddog_prof_SigInfo *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->signum = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_SigInfo_signum_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_SigInfo *arg1 = (struct ddog_prof_SigInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_SigInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_SigInfo *","signum", 1, self )); + } + arg1 = (struct ddog_prof_SigInfo *)(argp1); + result = ((arg1)->signum); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_SigInfo_signame_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_SigInfo *arg1 = (struct ddog_prof_SigInfo *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_SigInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_SigInfo *","signame", 1, self )); + } + arg1 = (struct ddog_prof_SigInfo *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","signame", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->signame = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_SigInfo_signame_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_SigInfo *arg1 = (struct ddog_prof_SigInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_SigInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_SigInfo *","signame", 1, self )); + } + arg1 = (struct ddog_prof_SigInfo *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->signame); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_SigInfo_allocate(VALUE self) +#else +_wrap_ddog_prof_SigInfo_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_SigInfo); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_SigInfo(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_SigInfo *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_SigInfo *)calloc(1, sizeof(struct ddog_prof_SigInfo)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_SigInfo(void *self) { + struct ddog_prof_SigInfo *arg1 = (struct ddog_prof_SigInfo *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Option_U32; + +SWIGINTERN VALUE +_wrap_ddog_prof_Option_U32_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Option_U32 *arg1 = (struct ddog_prof_Option_U32 *) 0 ; + ddog_prof_Option_U32_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Option_U32 *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Option_U32_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Option_U32_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Option_U32_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Option_U32 *arg1 = (struct ddog_prof_Option_U32 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Option_U32_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Option_U32 *)(argp1); + result = (ddog_prof_Option_U32_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Option_U32_some_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Option_U32 *arg1 = (struct ddog_prof_Option_U32 *) 0 ; + uint32_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","some", 1, self )); + } + arg1 = (struct ddog_prof_Option_U32 *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uint32_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint32_t","some", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint32_t","some", 2, argv[0])); + } else { + arg2 = *((uint32_t *)(argp2)); + } + } + if (arg1) (arg1)->some = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Option_U32_some_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Option_U32 *arg1 = (struct ddog_prof_Option_U32 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint32_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","some", 1, self )); + } + arg1 = (struct ddog_prof_Option_U32 *)(argp1); + result = ((arg1)->some); + vresult = SWIG_NewPointerObj((uint32_t *)memcpy((uint32_t *)calloc(1,sizeof(uint32_t)),&result,sizeof(uint32_t)), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Option_U32_allocate(VALUE self) +#else +_wrap_ddog_prof_Option_U32_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Option_U32); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Option_U32(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Option_U32 *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Option_U32 *)calloc(1, sizeof(struct ddog_prof_Option_U32)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Option_U32(void *self) { + struct ddog_prof_Option_U32 *arg1 = (struct ddog_prof_Option_U32 *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_StackFrameNames; + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_colno_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + struct ddog_prof_Option_U32 *arg2 = (struct ddog_prof_Option_U32 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","colno", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","colno", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Option_U32 *)(argp2); + if (arg1) (arg1)->colno = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_colno_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Option_U32 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","colno", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + result = (struct ddog_prof_Option_U32 *)& ((arg1)->colno); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_filename_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","filename", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","filename", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->filename = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_filename_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","filename", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->filename); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_lineno_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + struct ddog_prof_Option_U32 *arg2 = (struct ddog_prof_Option_U32 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","lineno", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Option_U32 *","lineno", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Option_U32 *)(argp2); + if (arg1) (arg1)->lineno = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_lineno_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Option_U32 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","lineno", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + result = (struct ddog_prof_Option_U32 *)& ((arg1)->lineno); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Option_U32, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_name_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","name", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","name", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->name = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrameNames_name_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames *","name", 1, self )); + } + arg1 = (struct ddog_prof_StackFrameNames *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->name); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_StackFrameNames_allocate(VALUE self) +#else +_wrap_ddog_prof_StackFrameNames_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_StackFrameNames); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_StackFrameNames(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrameNames *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_StackFrameNames *)calloc(1, sizeof(struct ddog_prof_StackFrameNames)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_StackFrameNames(void *self) { + struct ddog_prof_StackFrameNames *arg1 = (struct ddog_prof_StackFrameNames *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_StackFrameNames; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrameNames_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrameNames *arg1 = (struct ddog_prof_Slice_StackFrameNames *) 0 ; + struct ddog_prof_StackFrameNames *arg2 = (struct ddog_prof_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrameNames *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrameNames *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_StackFrameNames, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrameNames const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_StackFrameNames *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_StackFrameNames const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrameNames_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrameNames *arg1 = (struct ddog_prof_Slice_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_StackFrameNames *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrameNames *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrameNames *)(argp1); + result = (struct ddog_prof_StackFrameNames *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_StackFrameNames, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrameNames_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrameNames *arg1 = (struct ddog_prof_Slice_StackFrameNames *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrameNames *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrameNames *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrameNames_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrameNames *arg1 = (struct ddog_prof_Slice_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrameNames *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrameNames *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_StackFrameNames_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_StackFrameNames_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_StackFrameNames); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_StackFrameNames(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrameNames *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_StackFrameNames *)calloc(1, sizeof(struct ddog_prof_Slice_StackFrameNames)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_StackFrameNames(void *self) { + struct ddog_prof_Slice_StackFrameNames *arg1 = (struct ddog_prof_Slice_StackFrameNames *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Slice_U8; + +SWIGINTERN VALUE +_wrap_ddog_Slice_U8_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_U8 *arg1 = (struct ddog_Slice_U8 *) 0 ; + uint8_t *arg2 = (uint8_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_U8 *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_U8 *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_uint8_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint8_t const *","ptr", 2, argv[0] )); + } + arg2 = (uint8_t *)(argp2); + if (arg1) (arg1)->ptr = (uint8_t const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_U8_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_U8 *arg1 = (struct ddog_Slice_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint8_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_U8 *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_U8 *)(argp1); + result = (uint8_t *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint8_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_U8_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_U8 *arg1 = (struct ddog_Slice_U8 *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_U8 *","len", 1, self )); + } + arg1 = (struct ddog_Slice_U8 *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_U8_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_U8 *arg1 = (struct ddog_Slice_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_U8 *","len", 1, self )); + } + arg1 = (struct ddog_Slice_U8 *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Slice_U8_allocate(VALUE self) +#else +_wrap_ddog_Slice_U8_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Slice_U8); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Slice_U8(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_U8 *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Slice_U8 *)calloc(1, sizeof(struct ddog_Slice_U8)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Slice_U8(void *self) { + struct ddog_Slice_U8 *arg1 = (struct ddog_Slice_U8 *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_NormalizedAddress; + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_file_offset_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","file_offset", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->file_offset = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_file_offset_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","file_offset", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + result = ((arg1)->file_offset); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_build_id_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + ddog_ByteSlice *arg2 = (ddog_ByteSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_ByteSlice *","build_id", 2, argv[0] )); + } + arg2 = (ddog_ByteSlice *)(argp2); + if (arg1) (arg1)->build_id = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_build_id_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_ByteSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + result = (ddog_ByteSlice *)& ((arg1)->build_id); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_path_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","path", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","path", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->path = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_path_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","path", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->path); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_typ_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + enum ddog_prof_NormalizedAddressTypes arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","typ", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "enum ddog_prof_NormalizedAddressTypes","typ", 2, argv[0] )); + } + arg2 = (enum ddog_prof_NormalizedAddressTypes)(val2); + if (arg1) (arg1)->typ = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_NormalizedAddress_typ_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + enum ddog_prof_NormalizedAddressTypes result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","typ", 1, self )); + } + arg1 = (struct ddog_prof_NormalizedAddress *)(argp1); + result = (enum ddog_prof_NormalizedAddressTypes) ((arg1)->typ); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_NormalizedAddress_allocate(VALUE self) +#else +_wrap_ddog_prof_NormalizedAddress_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_NormalizedAddress); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_NormalizedAddress(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_NormalizedAddress *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_NormalizedAddress *)calloc(1, sizeof(struct ddog_prof_NormalizedAddress)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_NormalizedAddress(void *self) { + struct ddog_prof_NormalizedAddress *arg1 = (struct ddog_prof_NormalizedAddress *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_StackFrame; + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_build_id_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","build_id", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->build_id = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_build_id_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->build_id); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_ip_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","ip", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->ip = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_ip_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","ip", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = ((arg1)->ip); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_module_base_address_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","module_base_address", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->module_base_address = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_module_base_address_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","module_base_address", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = ((arg1)->module_base_address); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_names_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + struct ddog_prof_Slice_StackFrameNames *arg2 = (struct ddog_prof_Slice_StackFrameNames *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","names", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrameNames *","names", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_StackFrameNames *)(argp2); + if (arg1) (arg1)->names = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_names_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_StackFrameNames *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","names", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = (struct ddog_prof_Slice_StackFrameNames *)& ((arg1)->names); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_normalized_ip_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + struct ddog_prof_NormalizedAddress *arg2 = (struct ddog_prof_NormalizedAddress *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","normalized_ip", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_NormalizedAddress *","normalized_ip", 2, argv[0] )); + } + arg2 = (struct ddog_prof_NormalizedAddress *)(argp2); + if (arg1) (arg1)->normalized_ip = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_normalized_ip_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_NormalizedAddress *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","normalized_ip", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = (struct ddog_prof_NormalizedAddress *)& ((arg1)->normalized_ip); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_NormalizedAddress, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_sp_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","sp", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->sp = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_sp_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","sp", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = ((arg1)->sp); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_symbol_address_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","symbol_address", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->symbol_address = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StackFrame_symbol_address_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame *","symbol_address", 1, self )); + } + arg1 = (struct ddog_prof_StackFrame *)(argp1); + result = ((arg1)->symbol_address); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_StackFrame_allocate(VALUE self) +#else +_wrap_ddog_prof_StackFrame_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_StackFrame); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_StackFrame(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StackFrame *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_StackFrame *)calloc(1, sizeof(struct ddog_prof_StackFrame)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_StackFrame(void *self) { + struct ddog_prof_StackFrame *arg1 = (struct ddog_prof_StackFrame *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_StackFrame; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrame_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrame *arg1 = (struct ddog_prof_Slice_StackFrame *) 0 ; + struct ddog_prof_StackFrame *arg2 = (struct ddog_prof_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrame *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrame *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_StackFrame, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_StackFrame const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_StackFrame *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_StackFrame const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrame_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrame *arg1 = (struct ddog_prof_Slice_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_StackFrame *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrame *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrame *)(argp1); + result = (struct ddog_prof_StackFrame *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_StackFrame, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrame_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrame *arg1 = (struct ddog_prof_Slice_StackFrame *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrame *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrame *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_StackFrame_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrame *arg1 = (struct ddog_prof_Slice_StackFrame *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_StackFrame, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrame *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_StackFrame *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_StackFrame_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_StackFrame_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_StackFrame); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_StackFrame(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_StackFrame *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_StackFrame *)calloc(1, sizeof(struct ddog_prof_Slice_StackFrame)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_StackFrame(void *self) { + struct ddog_prof_Slice_StackFrame *arg1 = (struct ddog_prof_Slice_StackFrame *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_StringWrapper; + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapper_message_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapper *arg1 = (struct ddog_prof_StringWrapper *) 0 ; + struct ddog_Vec_U8 *arg2 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapper *","message", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapper *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","message", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_U8 *)(argp2); + if (arg1) (arg1)->message = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapper_message_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapper *arg1 = (struct ddog_prof_StringWrapper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_U8 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapper *","message", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapper *)(argp1); + result = (struct ddog_Vec_U8 *)& ((arg1)->message); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_StringWrapper_allocate(VALUE self) +#else +_wrap_ddog_prof_StringWrapper_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_StringWrapper); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_StringWrapper(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapper *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_StringWrapper *)calloc(1, sizeof(struct ddog_prof_StringWrapper)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_StringWrapper(void *self) { + struct ddog_prof_StringWrapper *arg1 = (struct ddog_prof_StringWrapper *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_StringWrapperResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + ddog_prof_StringWrapperResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_StringWrapperResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_StringWrapperResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_StringWrapperResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + result = (ddog_prof_StringWrapperResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + struct ddog_prof_StringWrapper *arg2 = (struct ddog_prof_StringWrapper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapper *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_StringWrapper *)(argp2); + if (arg1) (arg1)->ok = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_StringWrapper *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + result = (struct ddog_prof_StringWrapper *)& ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_StringWrapper, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_StringWrapperResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_StringWrapperResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_StringWrapperResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_StringWrapperResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_StringWrapperResult_allocate(VALUE self) +#else +_wrap_ddog_prof_StringWrapperResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_StringWrapperResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_StringWrapperResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_StringWrapperResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_StringWrapperResult *)calloc(1, sizeof(struct ddog_prof_StringWrapperResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_StringWrapperResult(void *self) { + struct ddog_prof_StringWrapperResult *arg1 = (struct ddog_prof_StringWrapperResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Exporter_File; + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_File_name_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_File *arg1 = (struct ddog_prof_Exporter_File *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_File *","name", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_File *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","name", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->name = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_File_name_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_File *arg1 = (struct ddog_prof_Exporter_File *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_File *","name", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_File *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->name); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_File_file_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_File *arg1 = (struct ddog_prof_Exporter_File *) 0 ; + ddog_ByteSlice *arg2 = (ddog_ByteSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_File *","file", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_File *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_ByteSlice *","file", 2, argv[0] )); + } + arg2 = (ddog_ByteSlice *)(argp2); + if (arg1) (arg1)->file = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_File_file_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_File *arg1 = (struct ddog_prof_Exporter_File *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_ByteSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_File *","file", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_File *)(argp1); + result = (ddog_ByteSlice *)& ((arg1)->file); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Exporter_File_allocate(VALUE self) +#else +_wrap_ddog_prof_Exporter_File_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Exporter_File); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Exporter_File(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_File *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Exporter_File *)calloc(1, sizeof(struct ddog_prof_Exporter_File)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Exporter_File(void *self) { + struct ddog_prof_Exporter_File *arg1 = (struct ddog_prof_Exporter_File *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Exporter_Slice_File; + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Slice_File_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File *arg1 = (struct ddog_prof_Exporter_Slice_File *) 0 ; + struct ddog_prof_Exporter_File *arg2 = (struct ddog_prof_Exporter_File *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Slice_File *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Exporter_File, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_File const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Exporter_File *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_Exporter_File const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Slice_File_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File *arg1 = (struct ddog_prof_Exporter_Slice_File *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Exporter_File *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Slice_File *)(argp1); + result = (struct ddog_prof_Exporter_File *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Exporter_File, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Slice_File_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File *arg1 = (struct ddog_prof_Exporter_Slice_File *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File *","len", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Slice_File *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Slice_File_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File *arg1 = (struct ddog_prof_Exporter_Slice_File *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File *","len", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Slice_File *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Exporter_Slice_File_allocate(VALUE self) +#else +_wrap_ddog_prof_Exporter_Slice_File_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Exporter_Slice_File); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Exporter_Slice_File(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Exporter_Slice_File *)calloc(1, sizeof(struct ddog_prof_Exporter_Slice_File)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Exporter_Slice_File(void *self) { + struct ddog_prof_Exporter_Slice_File *arg1 = (struct ddog_prof_Exporter_Slice_File *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Exporter_NewResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + ddog_prof_Exporter_NewResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Exporter_NewResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Exporter_NewResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Exporter_NewResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + result = (ddog_prof_Exporter_NewResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + struct ddog_prof_Exporter *arg2 = (struct ddog_prof_Exporter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Exporter, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Exporter *)(argp2); + if (arg1) (arg1)->ok = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Exporter *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + result = (struct ddog_prof_Exporter *) ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Exporter, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_NewResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_NewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_NewResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Exporter_NewResult_allocate(VALUE self) +#else +_wrap_ddog_prof_Exporter_NewResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Exporter_NewResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Exporter_NewResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_NewResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Exporter_NewResult *)calloc(1, sizeof(struct ddog_prof_Exporter_NewResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Exporter_NewResult(void *self) { + struct ddog_prof_Exporter_NewResult *arg1 = (struct ddog_prof_Exporter_NewResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Exporter_Request_BuildResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + ddog_prof_Exporter_Request_BuildResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Exporter_Request_BuildResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Exporter_Request_BuildResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Exporter_Request_BuildResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + result = (ddog_prof_Exporter_Request_BuildResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + struct ddog_prof_Exporter_Request *arg2 = (struct ddog_prof_Exporter_Request *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Exporter_Request, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Exporter_Request *)(argp2); + if (arg1) (arg1)->ok = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Exporter_Request *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + result = (struct ddog_prof_Exporter_Request *) ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Exporter_Request, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_BuildResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request_BuildResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Exporter_Request_BuildResult_allocate(VALUE self) +#else +_wrap_ddog_prof_Exporter_Request_BuildResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Exporter_Request_BuildResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request_BuildResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Exporter_Request_BuildResult *)calloc(1, sizeof(struct ddog_prof_Exporter_Request_BuildResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Exporter_Request_BuildResult(void *self) { + struct ddog_prof_Exporter_Request_BuildResult *arg1 = (struct ddog_prof_Exporter_Request_BuildResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Timespec; + +SWIGINTERN VALUE +_wrap_ddog_Timespec_seconds_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Timespec *arg1 = (struct ddog_Timespec *) 0 ; + int64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Timespec *","seconds", 1, self )); + } + arg1 = (struct ddog_Timespec *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","seconds", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","seconds", 2, argv[0])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + if (arg1) (arg1)->seconds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Timespec_seconds_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Timespec *arg1 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Timespec *","seconds", 1, self )); + } + arg1 = (struct ddog_Timespec *)(argp1); + result = ((arg1)->seconds); + vresult = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Timespec_nanoseconds_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Timespec *arg1 = (struct ddog_Timespec *) 0 ; + uint32_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Timespec *","nanoseconds", 1, self )); + } + arg1 = (struct ddog_Timespec *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uint32_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint32_t","nanoseconds", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint32_t","nanoseconds", 2, argv[0])); + } else { + arg2 = *((uint32_t *)(argp2)); + } + } + if (arg1) (arg1)->nanoseconds = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Timespec_nanoseconds_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Timespec *arg1 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint32_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Timespec *","nanoseconds", 1, self )); + } + arg1 = (struct ddog_Timespec *)(argp1); + result = ((arg1)->nanoseconds); + vresult = SWIG_NewPointerObj((uint32_t *)memcpy((uint32_t *)calloc(1,sizeof(uint32_t)),&result,sizeof(uint32_t)), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Timespec_allocate(VALUE self) +#else +_wrap_ddog_Timespec_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Timespec); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Timespec(int argc, VALUE *argv, VALUE self) { + struct ddog_Timespec *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Timespec *)calloc(1, sizeof(struct ddog_Timespec)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Timespec(void *self) { + struct ddog_Timespec *arg1 = (struct ddog_Timespec *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_HttpStatus; + +SWIGINTERN VALUE +_wrap_ddog_HttpStatus_code_set(int argc, VALUE *argv, VALUE self) { + struct ddog_HttpStatus *arg1 = (struct ddog_HttpStatus *) 0 ; + uint16_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_HttpStatus, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_HttpStatus *","code", 1, self )); + } + arg1 = (struct ddog_HttpStatus *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uint16_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint16_t","code", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint16_t","code", 2, argv[0])); + } else { + arg2 = *((uint16_t *)(argp2)); + } + } + if (arg1) (arg1)->code = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_HttpStatus_code_get(int argc, VALUE *argv, VALUE self) { + struct ddog_HttpStatus *arg1 = (struct ddog_HttpStatus *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint16_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_HttpStatus, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_HttpStatus *","code", 1, self )); + } + arg1 = (struct ddog_HttpStatus *)(argp1); + result = ((arg1)->code); + vresult = SWIG_NewPointerObj((uint16_t *)memcpy((uint16_t *)calloc(1,sizeof(uint16_t)),&result,sizeof(uint16_t)), SWIGTYPE_p_uint16_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_HttpStatus_allocate(VALUE self) +#else +_wrap_ddog_HttpStatus_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_HttpStatus); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_HttpStatus(int argc, VALUE *argv, VALUE self) { + struct ddog_HttpStatus *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_HttpStatus *)calloc(1, sizeof(struct ddog_HttpStatus)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_HttpStatus(void *self) { + struct ddog_HttpStatus *arg1 = (struct ddog_HttpStatus *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Exporter_SendResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + ddog_prof_Exporter_SendResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Exporter_SendResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Exporter_SendResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Exporter_SendResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + result = (ddog_prof_Exporter_SendResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_http_response_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + struct ddog_HttpStatus *arg2 = (struct ddog_HttpStatus *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","http_response", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_HttpStatus, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_HttpStatus *","http_response", 2, argv[0] )); + } + arg2 = (struct ddog_HttpStatus *)(argp2); + if (arg1) (arg1)->http_response = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_http_response_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_HttpStatus *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","http_response", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + result = (struct ddog_HttpStatus *)& ((arg1)->http_response); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_HttpStatus, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_SendResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Exporter_SendResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_SendResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Exporter_SendResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Exporter_SendResult_allocate(VALUE self) +#else +_wrap_ddog_prof_Exporter_SendResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Exporter_SendResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Exporter_SendResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_SendResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Exporter_SendResult *)calloc(1, sizeof(struct ddog_prof_Exporter_SendResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Exporter_SendResult(void *self) { + struct ddog_prof_Exporter_SendResult *arg1 = (struct ddog_prof_Exporter_SendResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Profile; + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_inner_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_prof_Profile *arg2 = (struct ddog_prof_Profile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","inner", 1, self )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Profile, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","inner", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Profile *)(argp2); + if (arg1) (arg1)->inner = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_inner_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Profile *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","inner", 1, self )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + result = (struct ddog_prof_Profile *) ((arg1)->inner); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Profile_allocate(VALUE self) +#else +_wrap_ddog_prof_Profile_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Profile); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Profile(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Profile *)calloc(1, sizeof(struct ddog_prof_Profile)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Profile(void *self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Profile_NewResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + ddog_prof_Profile_NewResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Profile_NewResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Profile_NewResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Profile_NewResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + result = (ddog_prof_Profile_NewResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + struct ddog_prof_Profile *arg2 = (struct ddog_prof_Profile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Profile *)(argp2); + if (arg1) (arg1)->ok = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Profile *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + result = (struct ddog_prof_Profile *)& ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_NewResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_NewResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_NewResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_NewResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Profile_NewResult_allocate(VALUE self) +#else +_wrap_ddog_prof_Profile_NewResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Profile_NewResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Profile_NewResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_NewResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Profile_NewResult *)calloc(1, sizeof(struct ddog_prof_Profile_NewResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Profile_NewResult(void *self) { + struct ddog_prof_Profile_NewResult *arg1 = (struct ddog_prof_Profile_NewResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_ValueType; + +SWIGINTERN VALUE +_wrap_ddog_prof_ValueType_type__set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_ValueType *arg1 = (struct ddog_prof_ValueType *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType *","type_", 1, self )); + } + arg1 = (struct ddog_prof_ValueType *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","type_", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->type_ = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_ValueType_type__get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_ValueType *arg1 = (struct ddog_prof_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType *","type_", 1, self )); + } + arg1 = (struct ddog_prof_ValueType *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->type_); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_ValueType_unit_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_ValueType *arg1 = (struct ddog_prof_ValueType *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType *","unit", 1, self )); + } + arg1 = (struct ddog_prof_ValueType *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","unit", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->unit = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_ValueType_unit_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_ValueType *arg1 = (struct ddog_prof_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType *","unit", 1, self )); + } + arg1 = (struct ddog_prof_ValueType *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->unit); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_ValueType_allocate(VALUE self) +#else +_wrap_ddog_prof_ValueType_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_ValueType); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_ValueType(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_ValueType *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_ValueType *)calloc(1, sizeof(struct ddog_prof_ValueType)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_ValueType(void *self) { + struct ddog_prof_ValueType *arg1 = (struct ddog_prof_ValueType *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_ValueType; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_ValueType_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType *arg1 = (struct ddog_prof_Slice_ValueType *) 0 ; + struct ddog_prof_ValueType *arg2 = (struct ddog_prof_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_ValueType *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_ValueType *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_ValueType, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_ValueType *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_ValueType const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_ValueType_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType *arg1 = (struct ddog_prof_Slice_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_ValueType *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_ValueType *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_ValueType *)(argp1); + result = (struct ddog_prof_ValueType *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_ValueType_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType *arg1 = (struct ddog_prof_Slice_ValueType *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_ValueType *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_ValueType *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_ValueType_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType *arg1 = (struct ddog_prof_Slice_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_ValueType *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_ValueType *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_ValueType_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_ValueType_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_ValueType); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_ValueType(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_ValueType *)calloc(1, sizeof(struct ddog_prof_Slice_ValueType)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_ValueType(void *self) { + struct ddog_prof_Slice_ValueType *arg1 = (struct ddog_prof_Slice_ValueType *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Period; + +SWIGINTERN VALUE +_wrap_ddog_prof_Period_type__set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Period *arg1 = (struct ddog_prof_Period *) 0 ; + struct ddog_prof_ValueType *arg2 = (struct ddog_prof_ValueType *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Period, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Period *","type_", 1, self )); + } + arg1 = (struct ddog_prof_Period *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_ValueType *","type_", 2, argv[0] )); + } + arg2 = (struct ddog_prof_ValueType *)(argp2); + if (arg1) (arg1)->type_ = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Period_type__get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Period *arg1 = (struct ddog_prof_Period *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_ValueType *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Period, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Period *","type_", 1, self )); + } + arg1 = (struct ddog_prof_Period *)(argp1); + result = (struct ddog_prof_ValueType *)& ((arg1)->type_); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_ValueType, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Period_value_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Period *arg1 = (struct ddog_prof_Period *) 0 ; + int64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Period, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Period *","value", 1, self )); + } + arg1 = (struct ddog_prof_Period *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","value", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","value", 2, argv[0])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + if (arg1) (arg1)->value = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Period_value_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Period *arg1 = (struct ddog_prof_Period *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Period, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Period *","value", 1, self )); + } + arg1 = (struct ddog_prof_Period *)(argp1); + result = ((arg1)->value); + vresult = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Period_allocate(VALUE self) +#else +_wrap_ddog_prof_Period_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Period); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Period(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Period *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Period *)calloc(1, sizeof(struct ddog_prof_Period)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Period(void *self) { + struct ddog_prof_Period *arg1 = (struct ddog_prof_Period *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Profile_Result; + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + ddog_prof_Profile_Result_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Profile_Result_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Profile_Result_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Profile_Result_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + result = (ddog_prof_Profile_Result_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","ok", 2, argv[0] )); + } + arg2 = (bool)(val2); + if (arg1) (arg1)->ok = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + result = (bool) ((arg1)->ok); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_Result_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_Result, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_Result *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_Result *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Profile_Result_allocate(VALUE self) +#else +_wrap_ddog_prof_Profile_Result_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Profile_Result); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Profile_Result(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_Result *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Profile_Result *)calloc(1, sizeof(struct ddog_prof_Profile_Result)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Profile_Result(void *self) { + struct ddog_prof_Profile_Result *arg1 = (struct ddog_prof_Profile_Result *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Mapping; + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_memory_start_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","memory_start", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->memory_start = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_memory_start_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","memory_start", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + result = ((arg1)->memory_start); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_memory_limit_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","memory_limit", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->memory_limit = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_memory_limit_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","memory_limit", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + result = ((arg1)->memory_limit); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_file_offset_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","file_offset", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->file_offset = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_file_offset_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","file_offset", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + result = ((arg1)->file_offset); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_filename_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","filename", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","filename", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->filename = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_filename_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","filename", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->filename); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_build_id_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","build_id", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->build_id = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Mapping_build_id_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","build_id", 1, self )); + } + arg1 = (struct ddog_prof_Mapping *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->build_id); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Mapping_allocate(VALUE self) +#else +_wrap_ddog_prof_Mapping_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Mapping); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Mapping(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Mapping *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Mapping *)calloc(1, sizeof(struct ddog_prof_Mapping)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Mapping(void *self) { + struct ddog_prof_Mapping *arg1 = (struct ddog_prof_Mapping *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Function; + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_name_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","name", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","name", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->name = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_name_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","name", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->name); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_system_name_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","system_name", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","system_name", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->system_name = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_system_name_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","system_name", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->system_name); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_filename_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","filename", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","filename", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->filename = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_filename_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","filename", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->filename); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_start_line_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + int64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","start_line", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","start_line", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","start_line", 2, argv[0])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + if (arg1) (arg1)->start_line = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Function_start_line_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","start_line", 1, self )); + } + arg1 = (struct ddog_prof_Function *)(argp1); + result = ((arg1)->start_line); + vresult = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Function_allocate(VALUE self) +#else +_wrap_ddog_prof_Function_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Function); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Function(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Function *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Function *)calloc(1, sizeof(struct ddog_prof_Function)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Function(void *self) { + struct ddog_prof_Function *arg1 = (struct ddog_prof_Function *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Location; + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_mapping_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + struct ddog_prof_Mapping *arg2 = (struct ddog_prof_Mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","mapping", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Mapping *","mapping", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Mapping *)(argp2); + if (arg1) (arg1)->mapping = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_mapping_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Mapping *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","mapping", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + result = (struct ddog_prof_Mapping *)& ((arg1)->mapping); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Mapping, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_function_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + struct ddog_prof_Function *arg2 = (struct ddog_prof_Function *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","function", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Function *","function", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Function *)(argp2); + if (arg1) (arg1)->function = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_function_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Function *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","function", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + result = (struct ddog_prof_Function *)& ((arg1)->function); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Function, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_address_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + uint64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","address", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->address = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_address_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","address", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + result = ((arg1)->address); + vresult = SWIG_NewPointerObj((uint64_t *)memcpy((uint64_t *)calloc(1,sizeof(uint64_t)),&result,sizeof(uint64_t)), SWIGTYPE_p_uint64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_line_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + int64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","line", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","line", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","line", 2, argv[0])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + if (arg1) (arg1)->line = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Location_line_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Location *","line", 1, self )); + } + arg1 = (struct ddog_prof_Location *)(argp1); + result = ((arg1)->line); + vresult = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Location_allocate(VALUE self) +#else +_wrap_ddog_prof_Location_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Location); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Location(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Location *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Location *)calloc(1, sizeof(struct ddog_prof_Location)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Location(void *self) { + struct ddog_prof_Location *arg1 = (struct ddog_prof_Location *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_Location; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Location_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Location *arg1 = (struct ddog_prof_Slice_Location *) 0 ; + struct ddog_prof_Location *arg2 = (struct ddog_prof_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Location *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Location *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Location, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Location const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Location *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_Location const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Location_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Location *arg1 = (struct ddog_prof_Slice_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Location *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Location *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Location *)(argp1); + result = (struct ddog_prof_Location *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Location, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Location_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Location *arg1 = (struct ddog_prof_Slice_Location *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Location *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Location *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Location_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Location *arg1 = (struct ddog_prof_Slice_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Location *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Location *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_Location_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_Location_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_Location); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_Location(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Location *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_Location *)calloc(1, sizeof(struct ddog_prof_Slice_Location)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_Location(void *self) { + struct ddog_prof_Slice_Location *arg1 = (struct ddog_prof_Slice_Location *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Slice_I64; + +SWIGINTERN VALUE +_wrap_ddog_Slice_I64_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_I64 *arg1 = (struct ddog_Slice_I64 *) 0 ; + int64_t *arg2 = (int64_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_I64 *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_I64 *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int64_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t const *","ptr", 2, argv[0] )); + } + arg2 = (int64_t *)(argp2); + if (arg1) (arg1)->ptr = (int64_t const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_I64_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_I64 *arg1 = (struct ddog_Slice_I64 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_I64 *","ptr", 1, self )); + } + arg1 = (struct ddog_Slice_I64 *)(argp1); + result = (int64_t *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int64_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_I64_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_I64 *arg1 = (struct ddog_Slice_I64 *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_I64 *","len", 1, self )); + } + arg1 = (struct ddog_Slice_I64 *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Slice_I64_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_I64 *arg1 = (struct ddog_Slice_I64 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Slice_I64 *","len", 1, self )); + } + arg1 = (struct ddog_Slice_I64 *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Slice_I64_allocate(VALUE self) +#else +_wrap_ddog_Slice_I64_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Slice_I64); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Slice_I64(int argc, VALUE *argv, VALUE self) { + struct ddog_Slice_I64 *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Slice_I64 *)calloc(1, sizeof(struct ddog_Slice_I64)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Slice_I64(void *self) { + struct ddog_Slice_I64 *arg1 = (struct ddog_Slice_I64 *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Label; + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_key_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","key", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","key", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->key = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_key_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","key", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->key); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_str_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","str", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","str", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->str = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_str_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","str", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->str); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_num_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + int64_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","num", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","num", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","num", 2, argv[0])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + if (arg1) (arg1)->num = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_num_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int64_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","num", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + result = ((arg1)->num); + vresult = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_num_unit_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + ddog_CharSlice *arg2 = (ddog_CharSlice *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","num_unit", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice *","num_unit", 2, argv[0] )); + } + arg2 = (ddog_CharSlice *)(argp2); + if (arg1) (arg1)->num_unit = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Label_num_unit_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Label *","num_unit", 1, self )); + } + arg1 = (struct ddog_prof_Label *)(argp1); + result = (ddog_CharSlice *)& ((arg1)->num_unit); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Label_allocate(VALUE self) +#else +_wrap_ddog_prof_Label_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Label); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Label(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Label *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Label *)calloc(1, sizeof(struct ddog_prof_Label)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Label(void *self) { + struct ddog_prof_Label *arg1 = (struct ddog_prof_Label *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_Label; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Label_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Label *arg1 = (struct ddog_prof_Slice_Label *) 0 ; + struct ddog_prof_Label *arg2 = (struct ddog_prof_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Label *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Label *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Label, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Label const *","ptr", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Label *)(argp2); + if (arg1) (arg1)->ptr = (struct ddog_prof_Label const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Label_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Label *arg1 = (struct ddog_prof_Slice_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Label *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Label *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Label *)(argp1); + result = (struct ddog_prof_Label *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Label, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Label_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Label *arg1 = (struct ddog_prof_Slice_Label *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Label *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Label *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Label_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Label *arg1 = (struct ddog_prof_Slice_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Label *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Label *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_Label_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_Label_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_Label); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_Label(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Label *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_Label *)calloc(1, sizeof(struct ddog_prof_Slice_Label)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_Label(void *self) { + struct ddog_prof_Slice_Label *arg1 = (struct ddog_prof_Slice_Label *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Sample; + +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_locations_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + struct ddog_prof_Slice_Location *arg2 = (struct ddog_prof_Slice_Location *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","locations", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Location *","locations", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_Location *)(argp2); + if (arg1) (arg1)->locations = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_locations_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_Location *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","locations", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + result = (struct ddog_prof_Slice_Location *)& ((arg1)->locations); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_Location, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +/* + Document-method: Libdatadog_ruby::ddog_prof_Sample.values + + call-seq: + values -> ddog_Slice_I64 + +Return an Array of value elements. +*/ +/* + Document-method: Libdatadog_ruby::ddog_prof_Sample.values= + + call-seq: + values=(x) -> ddog_Slice_I64 + +Return an Array of value elements. +*/ +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_values_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + struct ddog_Slice_I64 *arg2 = (struct ddog_Slice_I64 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","values", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Slice_I64 *","values", 2, argv[0] )); + } + arg2 = (struct ddog_Slice_I64 *)(argp2); + if (arg1) (arg1)->values = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_values_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Slice_I64 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","values", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + result = (struct ddog_Slice_I64 *)& ((arg1)->values); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Slice_I64, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_labels_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + struct ddog_prof_Slice_Label *arg2 = (struct ddog_prof_Slice_Label *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","labels", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Label *","labels", 2, argv[0] )); + } + arg2 = (struct ddog_prof_Slice_Label *)(argp2); + if (arg1) (arg1)->labels = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Sample_labels_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_Slice_Label *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Sample, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Sample *","labels", 1, self )); + } + arg1 = (struct ddog_prof_Sample *)(argp1); + result = (struct ddog_prof_Slice_Label *)& ((arg1)->labels); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_Slice_Label, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Sample_allocate(VALUE self) +#else +_wrap_ddog_prof_Sample_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Sample); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Sample(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Sample *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Sample *)calloc(1, sizeof(struct ddog_prof_Sample)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Sample(void *self) { + struct ddog_prof_Sample *arg1 = (struct ddog_prof_Sample *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Slice_Usize; + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Usize_ptr_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Usize *arg1 = (struct ddog_prof_Slice_Usize *) 0 ; + uintptr_t *arg2 = (uintptr_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Usize, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Usize *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_uintptr_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uintptr_t const *","ptr", 2, argv[0] )); + } + arg2 = (uintptr_t *)(argp2); + if (arg1) (arg1)->ptr = (uintptr_t const *)arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Usize_ptr_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Usize *arg1 = (struct ddog_prof_Slice_Usize *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Usize, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize *","ptr", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Usize *)(argp1); + result = (uintptr_t *) ((arg1)->ptr); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uintptr_t, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Usize_len_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Usize *arg1 = (struct ddog_prof_Slice_Usize *) 0 ; + uintptr_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Usize, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Usize *)(argp1); + { + arg2 = (uintptr_t) NUM2ULONG(argv[0]); + } + if (arg1) (arg1)->len = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Slice_Usize_len_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Usize *arg1 = (struct ddog_prof_Slice_Usize *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uintptr_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Slice_Usize, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize *","len", 1, self )); + } + arg1 = (struct ddog_prof_Slice_Usize *)(argp1); + result = ((arg1)->len); + vresult = SWIG_NewPointerObj((uintptr_t *)memcpy((uintptr_t *)calloc(1,sizeof(uintptr_t)),&result,sizeof(uintptr_t)), SWIGTYPE_p_uintptr_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Slice_Usize_allocate(VALUE self) +#else +_wrap_ddog_prof_Slice_Usize_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Slice_Usize); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Slice_Usize(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_Usize *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Slice_Usize *)calloc(1, sizeof(struct ddog_prof_Slice_Usize)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Slice_Usize(void *self) { + struct ddog_prof_Slice_Usize *arg1 = (struct ddog_prof_Slice_Usize *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_EncodedProfile; + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_start_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + struct ddog_Timespec *arg2 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","start", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Timespec *","start", 2, argv[0] )); + } + arg2 = (struct ddog_Timespec *)(argp2); + if (arg1) (arg1)->start = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_start_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Timespec *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","start", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + result = (struct ddog_Timespec *)& ((arg1)->start); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_end_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + struct ddog_Timespec *arg2 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","end", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Timespec *","end", 2, argv[0] )); + } + arg2 = (struct ddog_Timespec *)(argp2); + if (arg1) (arg1)->end = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_end_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Timespec *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","end", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + result = (struct ddog_Timespec *)& ((arg1)->end); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_buffer_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + struct ddog_Vec_U8 *arg2 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","buffer", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 *","buffer", 2, argv[0] )); + } + arg2 = (struct ddog_Vec_U8 *)(argp2); + if (arg1) (arg1)->buffer = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_buffer_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Vec_U8 *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","buffer", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + result = (struct ddog_Vec_U8 *)& ((arg1)->buffer); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_endpoints_stats_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + struct ddog_prof_ProfiledEndpointsStats *arg2 = (struct ddog_prof_ProfiledEndpointsStats *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","endpoints_stats", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_ProfiledEndpointsStats, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_ProfiledEndpointsStats *","endpoints_stats", 2, argv[0] )); + } + arg2 = (struct ddog_prof_ProfiledEndpointsStats *)(argp2); + if (arg1) (arg1)->endpoints_stats = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_endpoints_stats_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_ProfiledEndpointsStats *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","endpoints_stats", 1, self )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + result = (struct ddog_prof_ProfiledEndpointsStats *) ((arg1)->endpoints_stats); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_ProfiledEndpointsStats, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_EncodedProfile_allocate(VALUE self) +#else +_wrap_ddog_prof_EncodedProfile_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_EncodedProfile); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_EncodedProfile(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_EncodedProfile *)calloc(1, sizeof(struct ddog_prof_EncodedProfile)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_EncodedProfile(void *self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_prof_Profile_SerializeResult; + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + ddog_prof_Profile_SerializeResult_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_prof_Profile_SerializeResult_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_prof_Profile_SerializeResult_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_prof_Profile_SerializeResult_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","tag", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + result = (ddog_prof_Profile_SerializeResult_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_ok_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + struct ddog_prof_EncodedProfile *arg2 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","ok", 2, argv[0] )); + } + arg2 = (struct ddog_prof_EncodedProfile *)(argp2); + if (arg1) (arg1)->ok = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_ok_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_EncodedProfile *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","ok", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + result = (struct ddog_prof_EncodedProfile *)& ((arg1)->ok); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_err_set(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + struct ddog_Error *arg2 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Error *","err", 2, argv[0] )); + } + arg2 = (struct ddog_Error *)(argp2); + if (arg1) (arg1)->err = *arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_SerializeResult_err_get(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_prof_Profile_SerializeResult, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile_SerializeResult *","err", 1, self )); + } + arg1 = (struct ddog_prof_Profile_SerializeResult *)(argp1); + result = (struct ddog_Error *)& ((arg1)->err); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_prof_Profile_SerializeResult_allocate(VALUE self) +#else +_wrap_ddog_prof_Profile_SerializeResult_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_prof_Profile_SerializeResult); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_prof_Profile_SerializeResult(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile_SerializeResult *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_prof_Profile_SerializeResult *)calloc(1, sizeof(struct ddog_prof_Profile_SerializeResult)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_prof_Profile_SerializeResult(void *self) { + struct ddog_prof_Profile_SerializeResult *arg1 = (struct ddog_prof_Profile_SerializeResult *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_Option_Bool; + +SWIGINTERN VALUE +_wrap_ddog_Option_Bool_tag_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Bool *arg1 = (struct ddog_Option_Bool *) 0 ; + ddog_Option_Bool_Tag arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Bool *","tag", 1, self )); + } + arg1 = (struct ddog_Option_Bool *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ddog_Option_Bool_Tag","tag", 2, argv[0] )); + } + arg2 = (ddog_Option_Bool_Tag)(val2); + if (arg1) (arg1)->tag = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Bool_tag_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Bool *arg1 = (struct ddog_Option_Bool *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_Option_Bool_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Bool *","tag", 1, self )); + } + arg1 = (struct ddog_Option_Bool *)(argp1); + result = (ddog_Option_Bool_Tag) ((arg1)->tag); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Bool_some_set(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Bool *arg1 = (struct ddog_Option_Bool *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Bool *","some", 1, self )); + } + arg1 = (struct ddog_Option_Bool *)(argp1); + ecode2 = SWIG_AsVal_bool(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","some", 2, argv[0] )); + } + arg2 = (bool)(val2); + if (arg1) (arg1)->some = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Option_Bool_some_get(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Bool *arg1 = (struct ddog_Option_Bool *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_Option_Bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Option_Bool *","some", 1, self )); + } + arg1 = (struct ddog_Option_Bool *)(argp1); + result = (bool) ((arg1)->some); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_Option_Bool_allocate(VALUE self) +#else +_wrap_ddog_Option_Bool_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_Option_Bool); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_Option_Bool(int argc, VALUE *argv, VALUE self) { + struct ddog_Option_Bool *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_Option_Bool *)calloc(1, sizeof(struct ddog_Option_Bool)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_Option_Bool(void *self) { + struct ddog_Option_Bool *arg1 = (struct ddog_Option_Bool *)self; + free((char *) arg1); +} + +static swig_class SwigClassDdog_ContextKey; + +SWIGINTERN VALUE +_wrap_ddog_ContextKey__0_set(int argc, VALUE *argv, VALUE self) { + struct ddog_ContextKey *arg1 = (struct ddog_ContextKey *) 0 ; + uint32_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_ContextKey, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_ContextKey *","_0", 1, self )); + } + arg1 = (struct ddog_ContextKey *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_uint32_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint32_t","_0", 2, argv[0] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint32_t","_0", 2, argv[0])); + } else { + arg2 = *((uint32_t *)(argp2)); + } + } + if (arg1) (arg1)->_0 = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_ContextKey__0_get(int argc, VALUE *argv, VALUE self) { + struct ddog_ContextKey *arg1 = (struct ddog_ContextKey *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint32_t result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_ContextKey, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_ContextKey *","_0", 1, self )); + } + arg1 = (struct ddog_ContextKey *)(argp1); + result = ((arg1)->_0); + vresult = SWIG_NewPointerObj((uint32_t *)memcpy((uint32_t *)calloc(1,sizeof(uint32_t)),&result,sizeof(uint32_t)), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_ContextKey__1_set(int argc, VALUE *argv, VALUE self) { + struct ddog_ContextKey *arg1 = (struct ddog_ContextKey *) 0 ; + enum ddog_MetricType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_ContextKey, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_ContextKey *","_1", 1, self )); + } + arg1 = (struct ddog_ContextKey *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "enum ddog_MetricType","_1", 2, argv[0] )); + } + arg2 = (enum ddog_MetricType)(val2); + if (arg1) (arg1)->_1 = arg2; + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_ContextKey__1_get(int argc, VALUE *argv, VALUE self) { + struct ddog_ContextKey *arg1 = (struct ddog_ContextKey *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + enum ddog_MetricType result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ddog_ContextKey, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_ContextKey *","_1", 1, self )); + } + arg1 = (struct ddog_ContextKey *)(argp1); + result = (enum ddog_MetricType) ((arg1)->_1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +#ifdef HAVE_RB_DEFINE_ALLOC_FUNC +_wrap_ddog_ContextKey_allocate(VALUE self) +#else +_wrap_ddog_ContextKey_allocate(int argc, VALUE *argv, VALUE self) +#endif +{ + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_ddog_ContextKey); +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC + rb_obj_call_init(vresult, argc, argv); +#endif + return vresult; +} + + +SWIGINTERN VALUE +_wrap_new_ddog_ContextKey(int argc, VALUE *argv, VALUE self) { + struct ddog_ContextKey *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_ContextKey *)calloc(1, sizeof(struct ddog_ContextKey)); + DATA_PTR(self) = result; + return self; +fail: + return Qnil; +} + + +SWIGINTERN void +free_ddog_ContextKey(void *self) { + struct ddog_ContextKey *arg1 = (struct ddog_ContextKey *)self; + free((char *) arg1); +} + +SWIGINTERN VALUE +_wrap_ddog_Error_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_Error *arg1 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Error *","ddog_Error_drop", 1, argv[0] )); + } + arg1 = (struct ddog_Error *)(argp1); + ddog_Error_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Error_message(int argc, VALUE *argv, VALUE self) { + struct ddog_Error *arg1 = (struct ddog_Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_Error, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Error const *","ddog_Error_message", 1, argv[0] )); + } + arg1 = (struct ddog_Error *)(argp1); + result = ddog_Error_message((struct ddog_Error const *)arg1); + vresult = SWIG_NewPointerObj((ddog_CharSlice *)memcpy((ddog_CharSlice *)calloc(1,sizeof(ddog_CharSlice)),&result,sizeof(ddog_CharSlice)), SWIGTYPE_p_ddog_Slice_CChar, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_MaybeError_drop(int argc, VALUE *argv, VALUE self) { + ddog_MaybeError arg1 ; + void *argp1 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Option_Error, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_MaybeError","ddog_MaybeError_drop", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_MaybeError","ddog_MaybeError_drop", 1, argv[0])); + } else { + arg1 = *((ddog_MaybeError *)(argp1)); + } + } + ddog_MaybeError_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_endpoint_from_url(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_Endpoint *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_endpoint_from_url", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_endpoint_from_url", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = (struct ddog_Endpoint *)ddog_endpoint_from_url(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Endpoint, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_endpoint_from_api_key(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_Endpoint *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_endpoint_from_api_key", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_endpoint_from_api_key", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = (struct ddog_Endpoint *)ddog_endpoint_from_api_key(arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_Endpoint, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_endpoint_from_api_key_and_site(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + ddog_CharSlice arg2 ; + struct ddog_Endpoint **arg3 = (struct ddog_Endpoint **) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + struct ddog_Error *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_endpoint_from_api_key_and_site", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_endpoint_from_api_key_and_site", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_endpoint_from_api_key_and_site", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_endpoint_from_api_key_and_site", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_p_ddog_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_Endpoint **","ddog_endpoint_from_api_key_and_site", 3, argv[2] )); + } + arg3 = (struct ddog_Endpoint **)(argp3); + result = (struct ddog_Error *)ddog_endpoint_from_api_key_and_site(arg1,arg2,arg3); + { + ddog_CharSlice char_slice = ddog_Error_message(result); + vresult = rb_str_new(char_slice.ptr, char_slice.len); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_endpoint_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_Endpoint *arg1 = (struct ddog_Endpoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_Endpoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Endpoint *","ddog_endpoint_drop", 1, argv[0] )); + } + arg1 = (struct ddog_Endpoint *)(argp1); + ddog_endpoint_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_StringWrapper_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_StringWrapper *arg1 = (struct ddog_StringWrapper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_StringWrapper *","ddog_StringWrapper_drop", 1, argv[0] )); + } + arg1 = (struct ddog_StringWrapper *)(argp1); + ddog_StringWrapper_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_StringWrapper_message(int argc, VALUE *argv, VALUE self) { + struct ddog_StringWrapper *arg1 = (struct ddog_StringWrapper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ddog_CharSlice result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_StringWrapper, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_StringWrapper const *","ddog_StringWrapper_message", 1, argv[0] )); + } + arg1 = (struct ddog_StringWrapper *)(argp1); + result = ddog_StringWrapper_message((struct ddog_StringWrapper const *)arg1); + vresult = SWIG_NewPointerObj((ddog_CharSlice *)memcpy((ddog_CharSlice *)calloc(1,sizeof(ddog_CharSlice)),&result,sizeof(ddog_CharSlice)), SWIGTYPE_p_ddog_Slice_CChar, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_new(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_Vec_Tag_new(); + vresult = SWIG_NewPointerObj((struct ddog_Vec_Tag *)memcpy((struct ddog_Vec_Tag *)calloc(1,sizeof(struct ddog_Vec_Tag)),&result,sizeof(struct ddog_Vec_Tag)), SWIGTYPE_p_ddog_Vec_Tag, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag arg1 ; + void *argp1 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Vec_Tag, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag","ddog_Vec_Tag_drop", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_Vec_Tag","ddog_Vec_Tag_drop", 1, argv[0])); + } else { + arg1 = *((struct ddog_Vec_Tag *)(argp1)); + } + } + ddog_Vec_Tag_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_push(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_Tag *arg1 = (struct ddog_Vec_Tag *) 0 ; + ddog_CharSlice arg2 ; + ddog_CharSlice arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_Vec_Tag_PushResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag *","ddog_Vec_Tag_push", 1, argv[0] )); + } + arg1 = (struct ddog_Vec_Tag *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_Vec_Tag_push", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_Vec_Tag_push", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_Vec_Tag_push", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_Vec_Tag_push", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + result = ddog_Vec_Tag_push(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_Vec_Tag_PushResult *)memcpy((struct ddog_Vec_Tag_PushResult *)calloc(1,sizeof(struct ddog_Vec_Tag_PushResult)),&result,sizeof(struct ddog_Vec_Tag_PushResult)), SWIGTYPE_p_ddog_Vec_Tag_PushResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_Tag_parse(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_Vec_Tag_ParseResult result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_Vec_Tag_parse", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_Vec_Tag_parse", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = ddog_Vec_Tag_parse(arg1); + vresult = SWIG_NewPointerObj((struct ddog_Vec_Tag_ParseResult *)memcpy((struct ddog_Vec_Tag_ParseResult *)calloc(1,sizeof(struct ddog_Vec_Tag_ParseResult)),&result,sizeof(struct ddog_Vec_Tag_ParseResult)), SWIGTYPE_p_ddog_Vec_Tag_ParseResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_shutdown(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_prof_Crashtracker_shutdown(); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_update_on_fork(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration arg1 ; + struct ddog_prof_CrashtrackerReceiverConfig arg2 ; + struct ddog_prof_CrashtrackerMetadata arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration","ddog_prof_Crashtracker_update_on_fork", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerConfiguration","ddog_prof_Crashtracker_update_on_fork", 1, argv[0])); + } else { + arg1 = *((struct ddog_prof_CrashtrackerConfiguration *)(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig","ddog_prof_Crashtracker_update_on_fork", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerReceiverConfig","ddog_prof_Crashtracker_update_on_fork", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_CrashtrackerReceiverConfig *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata","ddog_prof_Crashtracker_update_on_fork", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerMetadata","ddog_prof_Crashtracker_update_on_fork", 3, argv[2])); + } else { + arg3 = *((struct ddog_prof_CrashtrackerMetadata *)(argp3)); + } + } + result = ddog_prof_Crashtracker_update_on_fork(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_receiver_entry_point_stdin(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_prof_Crashtracker_receiver_entry_point_stdin(); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_receiver_entry_point_unix_socket(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Crashtracker_receiver_entry_point_unix_socket", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Crashtracker_receiver_entry_point_unix_socket", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = ddog_prof_Crashtracker_receiver_entry_point_unix_socket(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_init_with_receiver(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerConfiguration arg1 ; + struct ddog_prof_CrashtrackerReceiverConfig arg2 ; + struct ddog_prof_CrashtrackerMetadata arg3 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration","ddog_prof_Crashtracker_init_with_receiver", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerConfiguration","ddog_prof_Crashtracker_init_with_receiver", 1, argv[0])); + } else { + arg1 = *((struct ddog_prof_CrashtrackerConfiguration *)(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerReceiverConfig","ddog_prof_Crashtracker_init_with_receiver", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerReceiverConfig","ddog_prof_Crashtracker_init_with_receiver", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_CrashtrackerReceiverConfig *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata","ddog_prof_Crashtracker_init_with_receiver", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerMetadata","ddog_prof_Crashtracker_init_with_receiver", 3, argv[2])); + } else { + arg3 = *((struct ddog_prof_CrashtrackerMetadata *)(argp3)); + } + } + result = ddog_prof_Crashtracker_init_with_receiver(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_reset_counters(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_prof_Crashtracker_reset_counters(); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_begin_profiling_op(int argc, VALUE *argv, VALUE self) { + enum ddog_prof_ProfilingOpTypes arg1 ; + int val1 ; + int ecode1 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "enum ddog_prof_ProfilingOpTypes","ddog_prof_Crashtracker_begin_profiling_op", 1, argv[0] )); + } + arg1 = (enum ddog_prof_ProfilingOpTypes)(val1); + result = ddog_prof_Crashtracker_begin_profiling_op(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Crashtracker_end_profiling_op(int argc, VALUE *argv, VALUE self) { + enum ddog_prof_ProfilingOpTypes arg1 ; + int val1 ; + int ecode1 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "enum ddog_prof_ProfilingOpTypes","ddog_prof_Crashtracker_end_profiling_op", 1, argv[0] )); + } + arg1 = (enum ddog_prof_ProfilingOpTypes)(val1); + result = ddog_prof_Crashtracker_end_profiling_op(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_new(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfoNewResult result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_crashinfo_new(); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashInfoNewResult *)memcpy((struct ddog_prof_CrashInfoNewResult *)calloc(1,sizeof(struct ddog_prof_CrashInfoNewResult)),&result,sizeof(struct ddog_prof_CrashInfoNewResult)), SWIGTYPE_p_ddog_prof_CrashInfoNewResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_drop", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + ddog_crashinfo_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_normalize_ips(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + uint32_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_normalize_ips", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_uint32_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "uint32_t","ddog_crashinfo_normalize_ips", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint32_t","ddog_crashinfo_normalize_ips", 2, argv[1])); + } else { + arg2 = *((uint32_t *)(argp2)); + } + } + result = ddog_crashinfo_normalize_ips(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_add_counter(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + ddog_CharSlice arg2 ; + int64_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_add_counter", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_crashinfo_add_counter", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_crashinfo_add_counter", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "int64_t","ddog_crashinfo_add_counter", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","ddog_crashinfo_add_counter", 3, argv[2])); + } else { + arg3 = *((int64_t *)(argp3)); + } + } + result = ddog_crashinfo_add_counter(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_add_file(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + ddog_CharSlice arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_add_file", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_crashinfo_add_file", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_crashinfo_add_file", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + result = ddog_crashinfo_add_file(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_add_tag(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + ddog_CharSlice arg2 ; + ddog_CharSlice arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_add_tag", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_crashinfo_add_tag", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_crashinfo_add_tag", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_crashinfo_add_tag", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_crashinfo_add_tag", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + result = ddog_crashinfo_add_tag(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_set_metadata(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + struct ddog_prof_CrashtrackerMetadata arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_set_metadata", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerMetadata","ddog_crashinfo_set_metadata", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerMetadata","ddog_crashinfo_set_metadata", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_CrashtrackerMetadata *)(argp2)); + } + } + result = ddog_crashinfo_set_metadata(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_set_siginfo(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + struct ddog_prof_SigInfo arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_set_siginfo", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_SigInfo, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_SigInfo","ddog_crashinfo_set_siginfo", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_SigInfo","ddog_crashinfo_set_siginfo", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_SigInfo *)(argp2)); + } + } + result = ddog_crashinfo_set_siginfo(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_set_stacktrace(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + ddog_CharSlice arg2 ; + struct ddog_prof_Slice_StackFrame arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_set_stacktrace", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_crashinfo_set_stacktrace", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_crashinfo_set_stacktrace", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_prof_Slice_StackFrame, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_StackFrame","ddog_crashinfo_set_stacktrace", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Slice_StackFrame","ddog_crashinfo_set_stacktrace", 3, argv[2])); + } else { + arg3 = *((struct ddog_prof_Slice_StackFrame *)(argp3)); + } + } + result = ddog_crashinfo_set_stacktrace(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_set_timestamp(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + int64_t arg2 ; + uint32_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_set_timestamp", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int64_t","ddog_crashinfo_set_timestamp", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","ddog_crashinfo_set_timestamp", 2, argv[1])); + } else { + arg2 = *((int64_t *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_uint32_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "uint32_t","ddog_crashinfo_set_timestamp", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "uint32_t","ddog_crashinfo_set_timestamp", 3, argv[2])); + } else { + arg3 = *((uint32_t *)(argp3)); + } + } + result = ddog_crashinfo_set_timestamp(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_set_timestamp_to_now(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_set_timestamp_to_now", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + result = ddog_crashinfo_set_timestamp_to_now(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_crashinfo_upload_to_endpoint(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_CrashInfo *arg1 = (struct ddog_prof_CrashInfo *) 0 ; + struct ddog_prof_CrashtrackerConfiguration arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_CrashtrackerResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_CrashInfo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_CrashInfo *","ddog_crashinfo_upload_to_endpoint", 1, argv[0] )); + } + arg1 = (struct ddog_prof_CrashInfo *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_CrashtrackerConfiguration","ddog_crashinfo_upload_to_endpoint", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_CrashtrackerConfiguration","ddog_crashinfo_upload_to_endpoint", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_CrashtrackerConfiguration *)(argp2)); + } + } + result = ddog_crashinfo_upload_to_endpoint(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_CrashtrackerResult *)memcpy((struct ddog_prof_CrashtrackerResult *)calloc(1,sizeof(struct ddog_prof_CrashtrackerResult)),&result,sizeof(struct ddog_prof_CrashtrackerResult)), SWIGTYPE_p_ddog_prof_CrashtrackerResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_demangle(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + enum ddog_prof_DemangleOptions arg2 ; + void *argp1 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + struct ddog_prof_StringWrapperResult result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_demangle", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_demangle", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "enum ddog_prof_DemangleOptions","ddog_demangle", 2, argv[1] )); + } + arg2 = (enum ddog_prof_DemangleOptions)(val2); + result = ddog_demangle(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_StringWrapperResult *)memcpy((struct ddog_prof_StringWrapperResult *)calloc(1,sizeof(struct ddog_prof_StringWrapperResult)),&result,sizeof(struct ddog_prof_StringWrapperResult)), SWIGTYPE_p_ddog_prof_StringWrapperResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Slice_File_empty(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Slice_File result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = ddog_prof_Exporter_Slice_File_empty(); + vresult = SWIG_NewPointerObj((struct ddog_prof_Exporter_Slice_File *)memcpy((struct ddog_prof_Exporter_Slice_File *)calloc(1,sizeof(struct ddog_prof_Exporter_Slice_File)),&result,sizeof(struct ddog_prof_Exporter_Slice_File)), SWIGTYPE_p_ddog_prof_Exporter_Slice_File, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_agent(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_prof_Endpoint result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Endpoint_agent", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Endpoint_agent", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = ddog_prof_Endpoint_agent(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_Endpoint *)memcpy((struct ddog_prof_Endpoint *)calloc(1,sizeof(struct ddog_prof_Endpoint)),&result,sizeof(struct ddog_prof_Endpoint)), SWIGTYPE_p_ddog_prof_Endpoint, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Endpoint_agentless(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + ddog_CharSlice arg2 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + struct ddog_prof_Endpoint result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Endpoint_agentless", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Endpoint_agentless", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Endpoint_agentless", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Endpoint_agentless", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + result = ddog_prof_Endpoint_agentless(arg1,arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_Endpoint *)memcpy((struct ddog_prof_Endpoint *)calloc(1,sizeof(struct ddog_prof_Endpoint)),&result,sizeof(struct ddog_prof_Endpoint)), SWIGTYPE_p_ddog_prof_Endpoint, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Endpoint_file(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + void *argp1 ; + int res1 = 0 ; + struct ddog_prof_Endpoint result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_Endpoint_file", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_Endpoint_file", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + result = ddog_Endpoint_file(arg1); + vresult = SWIG_NewPointerObj((struct ddog_prof_Endpoint *)memcpy((struct ddog_prof_Endpoint *)calloc(1,sizeof(struct ddog_prof_Endpoint)),&result,sizeof(struct ddog_prof_Endpoint)), SWIGTYPE_p_ddog_prof_Endpoint, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_new(int argc, VALUE *argv, VALUE self) { + ddog_CharSlice arg1 ; + ddog_CharSlice arg2 ; + ddog_CharSlice arg3 ; + struct ddog_Vec_Tag *arg4 = (struct ddog_Vec_Tag *) 0 ; + struct ddog_prof_Endpoint arg5 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + struct ddog_prof_Exporter_NewResult result; + VALUE vresult = Qnil; + + if ((argc < 5) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Exporter_new", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Exporter_new", 1, argv[0])); + } else { + arg1 = *((ddog_CharSlice *)(argp1)); + } + } + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Exporter_new", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Exporter_new", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Exporter_new", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Exporter_new", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag const *","ddog_prof_Exporter_new", 4, argv[3] )); + } + arg4 = (struct ddog_Vec_Tag *)(argp4); + { + res5 = SWIG_ConvertPtr(argv[4], &argp5, SWIGTYPE_p_ddog_prof_Endpoint, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "struct ddog_prof_Endpoint","ddog_prof_Exporter_new", 5, argv[4] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Endpoint","ddog_prof_Exporter_new", 5, argv[4])); + } else { + arg5 = *((struct ddog_prof_Endpoint *)(argp5)); + } + } + result = ddog_prof_Exporter_new(arg1,arg2,arg3,(struct ddog_Vec_Tag const *)arg4,arg5); + vresult = SWIG_NewPointerObj((struct ddog_prof_Exporter_NewResult *)memcpy((struct ddog_prof_Exporter_NewResult *)calloc(1,sizeof(struct ddog_prof_Exporter_NewResult)),&result,sizeof(struct ddog_prof_Exporter_NewResult)), SWIGTYPE_p_ddog_prof_Exporter_NewResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter *arg1 = (struct ddog_prof_Exporter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Exporter, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter *","ddog_prof_Exporter_drop", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Exporter *)(argp1); + ddog_prof_Exporter_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_build(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter *arg1 = (struct ddog_prof_Exporter *) 0 ; + struct ddog_Timespec arg2 ; + struct ddog_Timespec arg3 ; + struct ddog_prof_Exporter_Slice_File arg4 ; + struct ddog_prof_Exporter_Slice_File arg5 ; + struct ddog_Vec_Tag *arg6 = (struct ddog_Vec_Tag *) 0 ; + struct ddog_prof_ProfiledEndpointsStats *arg7 = (struct ddog_prof_ProfiledEndpointsStats *) 0 ; + ddog_CharSlice *arg8 = (ddog_CharSlice *) 0 ; + ddog_CharSlice *arg9 = (ddog_CharSlice *) 0 ; + uint64_t arg10 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + void *argp5 ; + int res5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + void *argp7 = 0 ; + int res7 = 0 ; + void *argp8 = 0 ; + int res8 = 0 ; + void *argp9 = 0 ; + int res9 = 0 ; + struct ddog_prof_Exporter_Request_BuildResult result; + VALUE vresult = Qnil; + + if ((argc < 10) || (argc > 10)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 10)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Exporter, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter *","ddog_prof_Exporter_Request_build", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Exporter *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Timespec, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Timespec","ddog_prof_Exporter_Request_build", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_Timespec","ddog_prof_Exporter_Request_build", 2, argv[1])); + } else { + arg2 = *((struct ddog_Timespec *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Timespec, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_Timespec","ddog_prof_Exporter_Request_build", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_Timespec","ddog_prof_Exporter_Request_build", 3, argv[2])); + } else { + arg3 = *((struct ddog_Timespec *)(argp3)); + } + } + { + res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File","ddog_prof_Exporter_Request_build", 4, argv[3] )); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Exporter_Slice_File","ddog_prof_Exporter_Request_build", 4, argv[3])); + } else { + arg4 = *((struct ddog_prof_Exporter_Slice_File *)(argp4)); + } + } + { + res5 = SWIG_ConvertPtr(argv[4], &argp5, SWIGTYPE_p_ddog_prof_Exporter_Slice_File, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Slice_File","ddog_prof_Exporter_Request_build", 5, argv[4] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Exporter_Slice_File","ddog_prof_Exporter_Request_build", 5, argv[4])); + } else { + arg5 = *((struct ddog_prof_Exporter_Slice_File *)(argp5)); + } + } + res6 = SWIG_ConvertPtr(argv[5], &argp6,SWIGTYPE_p_ddog_Vec_Tag, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "struct ddog_Vec_Tag const *","ddog_prof_Exporter_Request_build", 6, argv[5] )); + } + arg6 = (struct ddog_Vec_Tag *)(argp6); + res7 = SWIG_ConvertPtr(argv[6], &argp7,SWIGTYPE_p_ddog_prof_ProfiledEndpointsStats, 0 | 0 ); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "struct ddog_prof_ProfiledEndpointsStats const *","ddog_prof_Exporter_Request_build", 7, argv[6] )); + } + arg7 = (struct ddog_prof_ProfiledEndpointsStats *)(argp7); + res8 = SWIG_ConvertPtr(argv[7], &argp8,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), Ruby_Format_TypeError( "", "ddog_CharSlice const *","ddog_prof_Exporter_Request_build", 8, argv[7] )); + } + arg8 = (ddog_CharSlice *)(argp8); + res9 = SWIG_ConvertPtr(argv[8], &argp9,SWIGTYPE_p_ddog_Slice_CChar, 0 | 0 ); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), Ruby_Format_TypeError( "", "ddog_CharSlice const *","ddog_prof_Exporter_Request_build", 9, argv[8] )); + } + arg9 = (ddog_CharSlice *)(argp9); + { + arg10 = (uint64_t) NUM2ULONG(argv[9]); + } + result = ddog_prof_Exporter_Request_build(arg1,arg2,arg3,arg4,arg5,(struct ddog_Vec_Tag const *)arg6,(struct ddog_prof_ProfiledEndpointsStats const *)arg7,(struct ddog_Slice_CChar const *)arg8,(struct ddog_Slice_CChar const *)arg9,arg10); + vresult = SWIG_NewPointerObj((struct ddog_prof_Exporter_Request_BuildResult *)memcpy((struct ddog_prof_Exporter_Request_BuildResult *)calloc(1,sizeof(struct ddog_prof_Exporter_Request_BuildResult)),&result,sizeof(struct ddog_prof_Exporter_Request_BuildResult)), SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_Request_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter_Request **arg1 = (struct ddog_prof_Exporter_Request **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_p_ddog_prof_Exporter_Request, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request **","ddog_prof_Exporter_Request_drop", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Exporter_Request **)(argp1); + ddog_prof_Exporter_Request_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Exporter_send(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Exporter *arg1 = (struct ddog_prof_Exporter *) 0 ; + struct ddog_prof_Exporter_Request **arg2 = (struct ddog_prof_Exporter_Request **) 0 ; + struct ddog_CancellationToken *arg3 = (struct ddog_CancellationToken *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + struct ddog_prof_Exporter_SendResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Exporter, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter *","ddog_prof_Exporter_send", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Exporter *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_ddog_prof_Exporter_Request, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Exporter_Request **","ddog_prof_Exporter_send", 2, argv[1] )); + } + arg2 = (struct ddog_prof_Exporter_Request **)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_CancellationToken const *","ddog_prof_Exporter_send", 3, argv[2] )); + } + arg3 = (struct ddog_CancellationToken *)(argp3); + result = ddog_prof_Exporter_send(arg1,arg2,(struct ddog_CancellationToken const *)arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_Exporter_SendResult *)memcpy((struct ddog_prof_Exporter_SendResult *)calloc(1,sizeof(struct ddog_prof_Exporter_SendResult)),&result,sizeof(struct ddog_prof_Exporter_SendResult)), SWIGTYPE_p_ddog_prof_Exporter_SendResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_CancellationToken_new(int argc, VALUE *argv, VALUE self) { + struct ddog_CancellationToken *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (struct ddog_CancellationToken *)ddog_CancellationToken_new(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_CancellationToken_clone(int argc, VALUE *argv, VALUE self) { + struct ddog_CancellationToken *arg1 = (struct ddog_CancellationToken *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_CancellationToken *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_CancellationToken const *","ddog_CancellationToken_clone", 1, argv[0] )); + } + arg1 = (struct ddog_CancellationToken *)(argp1); + result = (struct ddog_CancellationToken *)ddog_CancellationToken_clone((struct ddog_CancellationToken const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_CancellationToken_cancel(int argc, VALUE *argv, VALUE self) { + struct ddog_CancellationToken *arg1 = (struct ddog_CancellationToken *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_CancellationToken const *","ddog_CancellationToken_cancel", 1, argv[0] )); + } + arg1 = (struct ddog_CancellationToken *)(argp1); + result = (bool)ddog_CancellationToken_cancel((struct ddog_CancellationToken const *)arg1); + vresult = SWIG_From_bool((bool)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_CancellationToken_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_CancellationToken *arg1 = (struct ddog_CancellationToken *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_CancellationToken, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_CancellationToken *","ddog_CancellationToken_drop", 1, argv[0] )); + } + arg1 = (struct ddog_CancellationToken *)(argp1); + ddog_CancellationToken_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_new(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Slice_ValueType arg1 ; + struct ddog_prof_Period *arg2 = (struct ddog_prof_Period *) 0 ; + struct ddog_Timespec *arg3 = (struct ddog_Timespec *) 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + struct ddog_prof_Profile_NewResult result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + { + res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_ddog_prof_Slice_ValueType, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_ValueType","ddog_prof_Profile_new", 1, argv[0] )); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Slice_ValueType","ddog_prof_Profile_new", 1, argv[0])); + } else { + arg1 = *((struct ddog_prof_Slice_ValueType *)(argp1)); + } + } + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_ddog_prof_Period, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Period const *","ddog_prof_Profile_new", 2, argv[1] )); + } + arg2 = (struct ddog_prof_Period *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "struct ddog_Timespec const *","ddog_prof_Profile_new", 3, argv[2] )); + } + arg3 = (struct ddog_Timespec *)(argp3); + result = ddog_prof_Profile_new(arg1,(struct ddog_prof_Period const *)arg2,(struct ddog_Timespec const *)arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_NewResult *)memcpy((struct ddog_prof_Profile_NewResult *)calloc(1,sizeof(struct ddog_prof_Profile_NewResult)),&result,sizeof(struct ddog_prof_Profile_NewResult)), SWIGTYPE_p_ddog_prof_Profile_NewResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_drop", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + ddog_prof_Profile_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_add(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_prof_Sample arg2 ; + int64_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_add", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_Sample, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Sample","ddog_prof_Profile_add", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Sample","ddog_prof_Profile_add", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_Sample *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "int64_t","ddog_prof_Profile_add", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","ddog_prof_Profile_add", 3, argv[2])); + } else { + arg3 = *((int64_t *)(argp3)); + } + } + result = ddog_prof_Profile_add(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_set_endpoint(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + uint64_t arg2 ; + ddog_CharSlice arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_set_endpoint", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + { + arg2 = (uint64_t) NUM2ULONG(argv[1]); + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_set_endpoint", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_set_endpoint", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + result = ddog_prof_Profile_set_endpoint(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_add_endpoint_count(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + ddog_CharSlice arg2 ; + int64_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_add_endpoint_count", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_add_endpoint_count", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_add_endpoint_count", 2, argv[1])); + } else { + arg2 = *((ddog_CharSlice *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_int64_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "int64_t","ddog_prof_Profile_add_endpoint_count", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "int64_t","ddog_prof_Profile_add_endpoint_count", 3, argv[2])); + } else { + arg3 = *((int64_t *)(argp3)); + } + } + result = ddog_prof_Profile_add_endpoint_count(arg1,arg2,arg3); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_add_upscaling_rule_poisson(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_prof_Slice_Usize arg2 ; + ddog_CharSlice arg3 ; + ddog_CharSlice arg4 ; + uintptr_t arg5 ; + uintptr_t arg6 ; + uint64_t arg7 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 7) || (argc > 7)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_add_upscaling_rule_poisson", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_Slice_Usize, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize","ddog_prof_Profile_add_upscaling_rule_poisson", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Slice_Usize","ddog_prof_Profile_add_upscaling_rule_poisson", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_Slice_Usize *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_poisson", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_poisson", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + { + res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_poisson", 4, argv[3] )); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_poisson", 4, argv[3])); + } else { + arg4 = *((ddog_CharSlice *)(argp4)); + } + } + { + arg5 = (uintptr_t) NUM2ULONG(argv[4]); + } + { + arg6 = (uintptr_t) NUM2ULONG(argv[5]); + } + { + arg7 = (uint64_t) NUM2ULONG(argv[6]); + } + result = ddog_prof_Profile_add_upscaling_rule_poisson(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_add_upscaling_rule_proportional(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_prof_Slice_Usize arg2 ; + ddog_CharSlice arg3 ; + ddog_CharSlice arg4 ; + uint64_t arg5 ; + uint64_t arg6 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + void *argp4 ; + int res4 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 6) || (argc > 6)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_add_upscaling_rule_proportional", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + { + res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_ddog_prof_Slice_Usize, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_prof_Slice_Usize","ddog_prof_Profile_add_upscaling_rule_proportional", 2, argv[1] )); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "struct ddog_prof_Slice_Usize","ddog_prof_Profile_add_upscaling_rule_proportional", 2, argv[1])); + } else { + arg2 = *((struct ddog_prof_Slice_Usize *)(argp2)); + } + } + { + res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_proportional", 3, argv[2] )); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_proportional", 3, argv[2])); + } else { + arg3 = *((ddog_CharSlice *)(argp3)); + } + } + { + res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_ddog_Slice_CChar, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_proportional", 4, argv[3] )); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "ddog_CharSlice","ddog_prof_Profile_add_upscaling_rule_proportional", 4, argv[3])); + } else { + arg4 = *((ddog_CharSlice *)(argp4)); + } + } + { + arg5 = (uint64_t) NUM2ULONG(argv[4]); + } + { + arg6 = (uint64_t) NUM2ULONG(argv[5]); + } + result = ddog_prof_Profile_add_upscaling_rule_proportional(arg1,arg2,arg3,arg4,arg5,arg6); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_EncodedProfile_drop(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_EncodedProfile *arg1 = (struct ddog_prof_EncodedProfile *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_EncodedProfile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_EncodedProfile *","ddog_prof_EncodedProfile_drop", 1, argv[0] )); + } + arg1 = (struct ddog_prof_EncodedProfile *)(argp1); + ddog_prof_EncodedProfile_drop(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_serialize(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_Timespec *arg2 = (struct ddog_Timespec *) 0 ; + int64_t *arg3 = (int64_t *) 0 ; + struct ddog_Timespec *arg4 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + struct ddog_prof_Profile_SerializeResult result; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_serialize", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Timespec const *","ddog_prof_Profile_serialize", 2, argv[1] )); + } + arg2 = (struct ddog_Timespec *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_int64_t, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "int64_t const *","ddog_prof_Profile_serialize", 3, argv[2] )); + } + arg3 = (int64_t *)(argp3); + res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "struct ddog_Timespec const *","ddog_prof_Profile_serialize", 4, argv[3] )); + } + arg4 = (struct ddog_Timespec *)(argp4); + result = ddog_prof_Profile_serialize(arg1,(struct ddog_Timespec const *)arg2,(int64_t const *)arg3,(struct ddog_Timespec const *)arg4); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_SerializeResult *)memcpy((struct ddog_prof_Profile_SerializeResult *)calloc(1,sizeof(struct ddog_prof_Profile_SerializeResult)),&result,sizeof(struct ddog_prof_Profile_SerializeResult)), SWIGTYPE_p_ddog_prof_Profile_SerializeResult, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_Vec_U8_as_slice(int argc, VALUE *argv, VALUE self) { + struct ddog_Vec_U8 *arg1 = (struct ddog_Vec_U8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + struct ddog_Slice_U8 result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_Vec_U8, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_Vec_U8 const *","ddog_Vec_U8_as_slice", 1, argv[0] )); + } + arg1 = (struct ddog_Vec_U8 *)(argp1); + result = ddog_Vec_U8_as_slice((struct ddog_Vec_U8 const *)arg1); + vresult = SWIG_NewPointerObj((struct ddog_Slice_U8 *)memcpy((struct ddog_Slice_U8 *)calloc(1,sizeof(struct ddog_Slice_U8)),&result,sizeof(struct ddog_Slice_U8)), SWIGTYPE_p_ddog_Slice_U8, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_ddog_prof_Profile_reset(int argc, VALUE *argv, VALUE self) { + struct ddog_prof_Profile *arg1 = (struct ddog_prof_Profile *) 0 ; + struct ddog_Timespec *arg2 = (struct ddog_Timespec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + struct ddog_prof_Profile_Result result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_ddog_prof_Profile, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct ddog_prof_Profile *","ddog_prof_Profile_reset", 1, argv[0] )); + } + arg1 = (struct ddog_prof_Profile *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_ddog_Timespec, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "struct ddog_Timespec const *","ddog_prof_Profile_reset", 2, argv[1] )); + } + arg2 = (struct ddog_Timespec *)(argp2); + result = ddog_prof_Profile_reset(arg1,(struct ddog_Timespec const *)arg2); + vresult = SWIG_NewPointerObj((struct ddog_prof_Profile_Result *)memcpy((struct ddog_prof_Profile_Result *)calloc(1,sizeof(struct ddog_prof_Profile_Result)),&result,sizeof(struct ddog_prof_Profile_Result)), SWIGTYPE_p_ddog_prof_Profile_Result, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_CancellationToken = {"_p_ddog_CancellationToken", "ddog_CancellationToken *|struct ddog_CancellationToken *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_ConfigurationOrigin = {"_p_ddog_ConfigurationOrigin", "ddog_ConfigurationOrigin *|enum ddog_ConfigurationOrigin *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_ContextKey = {"_p_ddog_ContextKey", "ddog_ContextKey *|struct ddog_ContextKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Endpoint = {"_p_ddog_Endpoint", "ddog_Endpoint *|struct ddog_Endpoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Error = {"_p_ddog_Error", "ddog_Error *|struct ddog_Error *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_HttpStatus = {"_p_ddog_HttpStatus", "ddog_HttpStatus *|struct ddog_HttpStatus *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_LogLevel = {"_p_ddog_LogLevel", "ddog_LogLevel *|enum ddog_LogLevel *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_MetricNamespace = {"_p_ddog_MetricNamespace", "ddog_MetricNamespace *|enum ddog_MetricNamespace *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_MetricType = {"_p_ddog_MetricType", "ddog_MetricType *|enum ddog_MetricType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Option_Bool = {"_p_ddog_Option_Bool", "ddog_Option_Bool *|struct ddog_Option_Bool *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Option_Bool_Tag = {"_p_ddog_Option_Bool_Tag", "ddog_Option_Bool_Tag *|enum ddog_Option_Bool_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Option_Error = {"_p_ddog_Option_Error", "ddog_MaybeError *|ddog_Option_Error *|struct ddog_Option_Error *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Option_Error_Tag = {"_p_ddog_Option_Error_Tag", "ddog_Option_Error_Tag *|enum ddog_Option_Error_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Slice_CChar = {"_p_ddog_Slice_CChar", "ddog_CharSlice *|ddog_Slice_CChar *|struct ddog_Slice_CChar *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Slice_I64 = {"_p_ddog_Slice_I64", "ddog_Slice_I64 *|struct ddog_Slice_I64 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Slice_U8 = {"_p_ddog_Slice_U8", "ddog_ByteSlice *|ddog_Slice_U8 *|struct ddog_Slice_U8 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_StringWrapper = {"_p_ddog_StringWrapper", "ddog_StringWrapper *|struct ddog_StringWrapper *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Tag = {"_p_ddog_Tag", "ddog_Tag *|struct ddog_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_TelemetryWorkerBuilder = {"_p_ddog_TelemetryWorkerBuilder", "ddog_TelemetryWorkerBuilder *|struct ddog_TelemetryWorkerBuilder *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_TelemetryWorkerBuilderBoolProperty = {"_p_ddog_TelemetryWorkerBuilderBoolProperty", "ddog_TelemetryWorkerBuilderBoolProperty *|enum ddog_TelemetryWorkerBuilderBoolProperty *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_TelemetryWorkerBuilderEndpointProperty = {"_p_ddog_TelemetryWorkerBuilderEndpointProperty", "ddog_TelemetryWorkerBuilderEndpointProperty *|enum ddog_TelemetryWorkerBuilderEndpointProperty *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_TelemetryWorkerBuilderStrProperty = {"_p_ddog_TelemetryWorkerBuilderStrProperty", "ddog_TelemetryWorkerBuilderStrProperty *|enum ddog_TelemetryWorkerBuilderStrProperty *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_TelemetryWorkerHandle = {"_p_ddog_TelemetryWorkerHandle", "ddog_TelemetryWorkerHandle *|struct ddog_TelemetryWorkerHandle *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Timespec = {"_p_ddog_Timespec", "ddog_Timespec *|struct ddog_Timespec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Vec_Tag = {"_p_ddog_Vec_Tag", "ddog_Vec_Tag *|struct ddog_Vec_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Vec_Tag_ParseResult = {"_p_ddog_Vec_Tag_ParseResult", "ddog_Vec_Tag_ParseResult *|struct ddog_Vec_Tag_ParseResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Vec_Tag_PushResult = {"_p_ddog_Vec_Tag_PushResult", "ddog_Vec_Tag_PushResult *|struct ddog_Vec_Tag_PushResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Vec_Tag_PushResult_Tag = {"_p_ddog_Vec_Tag_PushResult_Tag", "ddog_Vec_Tag_PushResult_Tag *|enum ddog_Vec_Tag_PushResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_Vec_U8 = {"_p_ddog_Vec_U8", "ddog_Vec_U8 *|struct ddog_Vec_U8 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashInfo = {"_p_ddog_prof_CrashInfo", "ddog_prof_CrashInfo *|struct ddog_prof_CrashInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashInfoNewResult = {"_p_ddog_prof_CrashInfoNewResult", "ddog_prof_CrashInfoNewResult *|struct ddog_prof_CrashInfoNewResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashInfoNewResult_Tag = {"_p_ddog_prof_CrashInfoNewResult_Tag", "ddog_prof_CrashInfoNewResult_Tag *|enum ddog_prof_CrashInfoNewResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashtrackerConfiguration = {"_p_ddog_prof_CrashtrackerConfiguration", "ddog_prof_CrashtrackerConfiguration *|struct ddog_prof_CrashtrackerConfiguration *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashtrackerMetadata = {"_p_ddog_prof_CrashtrackerMetadata", "ddog_prof_CrashtrackerMetadata *|struct ddog_prof_CrashtrackerMetadata *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashtrackerReceiverConfig = {"_p_ddog_prof_CrashtrackerReceiverConfig", "ddog_prof_CrashtrackerReceiverConfig *|struct ddog_prof_CrashtrackerReceiverConfig *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashtrackerResult = {"_p_ddog_prof_CrashtrackerResult", "ddog_prof_CrashtrackerResult *|struct ddog_prof_CrashtrackerResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_CrashtrackerResult_Tag = {"_p_ddog_prof_CrashtrackerResult_Tag", "ddog_prof_CrashtrackerResult_Tag *|enum ddog_prof_CrashtrackerResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_DemangleOptions = {"_p_ddog_prof_DemangleOptions", "ddog_prof_DemangleOptions *|enum ddog_prof_DemangleOptions *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_EncodedProfile = {"_p_ddog_prof_EncodedProfile", "ddog_prof_EncodedProfile *|struct ddog_prof_EncodedProfile *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Endpoint = {"_p_ddog_prof_Endpoint", "ddog_prof_Endpoint *|struct ddog_prof_Endpoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Endpoint_Tag = {"_p_ddog_prof_Endpoint_Tag", "ddog_prof_Endpoint_Tag *|enum ddog_prof_Endpoint_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Endpoint_ddog_prof_Agentless_Body = {"_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body", "ddog_prof_Endpoint_ddog_prof_Agentless_Body *|struct ddog_prof_Endpoint_ddog_prof_Agentless_Body *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_EnvVar = {"_p_ddog_prof_EnvVar", "ddog_prof_EnvVar *|struct ddog_prof_EnvVar *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter = {"_p_ddog_prof_Exporter", "ddog_prof_Exporter *|struct ddog_prof_Exporter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_File = {"_p_ddog_prof_Exporter_File", "ddog_prof_Exporter_File *|struct ddog_prof_Exporter_File *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_NewResult = {"_p_ddog_prof_Exporter_NewResult", "ddog_prof_Exporter_NewResult *|struct ddog_prof_Exporter_NewResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_NewResult_Tag = {"_p_ddog_prof_Exporter_NewResult_Tag", "ddog_prof_Exporter_NewResult_Tag *|enum ddog_prof_Exporter_NewResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_Request = {"_p_ddog_prof_Exporter_Request", "ddog_prof_Exporter_Request *|struct ddog_prof_Exporter_Request *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_Request_BuildResult = {"_p_ddog_prof_Exporter_Request_BuildResult", "ddog_prof_Exporter_Request_BuildResult *|struct ddog_prof_Exporter_Request_BuildResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_Request_BuildResult_Tag = {"_p_ddog_prof_Exporter_Request_BuildResult_Tag", "ddog_prof_Exporter_Request_BuildResult_Tag *|enum ddog_prof_Exporter_Request_BuildResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_SendResult = {"_p_ddog_prof_Exporter_SendResult", "ddog_prof_Exporter_SendResult *|struct ddog_prof_Exporter_SendResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_SendResult_Tag = {"_p_ddog_prof_Exporter_SendResult_Tag", "ddog_prof_Exporter_SendResult_Tag *|enum ddog_prof_Exporter_SendResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Exporter_Slice_File = {"_p_ddog_prof_Exporter_Slice_File", "ddog_prof_Exporter_Slice_File *|struct ddog_prof_Exporter_Slice_File *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Function = {"_p_ddog_prof_Function", "ddog_prof_Function *|struct ddog_prof_Function *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Label = {"_p_ddog_prof_Label", "ddog_prof_Label *|struct ddog_prof_Label *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Location = {"_p_ddog_prof_Location", "ddog_prof_Location *|struct ddog_prof_Location *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Mapping = {"_p_ddog_prof_Mapping", "ddog_prof_Mapping *|struct ddog_prof_Mapping *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_NormalizedAddress = {"_p_ddog_prof_NormalizedAddress", "ddog_prof_NormalizedAddress *|struct ddog_prof_NormalizedAddress *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_NormalizedAddressTypes = {"_p_ddog_prof_NormalizedAddressTypes", "ddog_prof_NormalizedAddressTypes *|enum ddog_prof_NormalizedAddressTypes *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Option_U32 = {"_p_ddog_prof_Option_U32", "ddog_prof_Option_U32 *|struct ddog_prof_Option_U32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Option_U32_Tag = {"_p_ddog_prof_Option_U32_Tag", "ddog_prof_Option_U32_Tag *|enum ddog_prof_Option_U32_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Period = {"_p_ddog_prof_Period", "ddog_prof_Period *|struct ddog_prof_Period *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile = {"_p_ddog_prof_Profile", "ddog_prof_Profile *|struct ddog_prof_Profile *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_NewResult = {"_p_ddog_prof_Profile_NewResult", "ddog_prof_Profile_NewResult *|struct ddog_prof_Profile_NewResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_NewResult_Tag = {"_p_ddog_prof_Profile_NewResult_Tag", "ddog_prof_Profile_NewResult_Tag *|enum ddog_prof_Profile_NewResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_Result = {"_p_ddog_prof_Profile_Result", "ddog_prof_Profile_Result *|struct ddog_prof_Profile_Result *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_Result_Tag = {"_p_ddog_prof_Profile_Result_Tag", "ddog_prof_Profile_Result_Tag *|enum ddog_prof_Profile_Result_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_SerializeResult = {"_p_ddog_prof_Profile_SerializeResult", "ddog_prof_Profile_SerializeResult *|struct ddog_prof_Profile_SerializeResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Profile_SerializeResult_Tag = {"_p_ddog_prof_Profile_SerializeResult_Tag", "ddog_prof_Profile_SerializeResult_Tag *|enum ddog_prof_Profile_SerializeResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_ProfiledEndpointsStats = {"_p_ddog_prof_ProfiledEndpointsStats", "ddog_prof_ProfiledEndpointsStats *|struct ddog_prof_ProfiledEndpointsStats *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_ProfilingOpTypes = {"_p_ddog_prof_ProfilingOpTypes", "ddog_prof_ProfilingOpTypes *|enum ddog_prof_ProfilingOpTypes *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Sample = {"_p_ddog_prof_Sample", "ddog_prof_Sample *|struct ddog_prof_Sample *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_SigInfo = {"_p_ddog_prof_SigInfo", "ddog_prof_SigInfo *|struct ddog_prof_SigInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_CharSlice = {"_p_ddog_prof_Slice_CharSlice", "ddog_prof_Slice_CharSlice *|struct ddog_prof_Slice_CharSlice *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_EnvVar = {"_p_ddog_prof_Slice_EnvVar", "ddog_prof_Slice_EnvVar *|struct ddog_prof_Slice_EnvVar *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_Label = {"_p_ddog_prof_Slice_Label", "ddog_prof_Slice_Label *|struct ddog_prof_Slice_Label *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_Location = {"_p_ddog_prof_Slice_Location", "ddog_prof_Slice_Location *|struct ddog_prof_Slice_Location *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_StackFrame = {"_p_ddog_prof_Slice_StackFrame", "ddog_prof_Slice_StackFrame *|struct ddog_prof_Slice_StackFrame *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_StackFrameNames = {"_p_ddog_prof_Slice_StackFrameNames", "ddog_prof_Slice_StackFrameNames *|struct ddog_prof_Slice_StackFrameNames *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_Usize = {"_p_ddog_prof_Slice_Usize", "ddog_prof_Slice_Usize *|struct ddog_prof_Slice_Usize *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_Slice_ValueType = {"_p_ddog_prof_Slice_ValueType", "ddog_prof_Slice_ValueType *|struct ddog_prof_Slice_ValueType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StackFrame = {"_p_ddog_prof_StackFrame", "ddog_prof_StackFrame *|struct ddog_prof_StackFrame *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StackFrameNames = {"_p_ddog_prof_StackFrameNames", "ddog_prof_StackFrameNames *|struct ddog_prof_StackFrameNames *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StacktraceCollection = {"_p_ddog_prof_StacktraceCollection", "ddog_prof_StacktraceCollection *|enum ddog_prof_StacktraceCollection *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StringWrapper = {"_p_ddog_prof_StringWrapper", "ddog_prof_StringWrapper *|struct ddog_prof_StringWrapper *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StringWrapperResult = {"_p_ddog_prof_StringWrapperResult", "ddog_prof_StringWrapperResult *|struct ddog_prof_StringWrapperResult *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_StringWrapperResult_Tag = {"_p_ddog_prof_StringWrapperResult_Tag", "ddog_prof_StringWrapperResult_Tag *|enum ddog_prof_StringWrapperResult_Tag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ddog_prof_ValueType = {"_p_ddog_prof_ValueType", "ddog_prof_ValueType *|struct ddog_prof_ValueType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_ddog_Endpoint = {"_p_p_ddog_Endpoint", "struct ddog_Endpoint **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_ddog_prof_Exporter_Request = {"_p_p_ddog_prof_Exporter_Request", "struct ddog_prof_Exporter_Request **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint16_t = {"_p_uint16_t", "uint16_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint64_t = {"_p_uint64_t", "uint64_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_uintptr_t = {"_p_uintptr_t", "uintptr_t *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_char, + &_swigt__p_ddog_CancellationToken, + &_swigt__p_ddog_ConfigurationOrigin, + &_swigt__p_ddog_ContextKey, + &_swigt__p_ddog_Endpoint, + &_swigt__p_ddog_Error, + &_swigt__p_ddog_HttpStatus, + &_swigt__p_ddog_LogLevel, + &_swigt__p_ddog_MetricNamespace, + &_swigt__p_ddog_MetricType, + &_swigt__p_ddog_Option_Bool, + &_swigt__p_ddog_Option_Bool_Tag, + &_swigt__p_ddog_Option_Error, + &_swigt__p_ddog_Option_Error_Tag, + &_swigt__p_ddog_Slice_CChar, + &_swigt__p_ddog_Slice_I64, + &_swigt__p_ddog_Slice_U8, + &_swigt__p_ddog_StringWrapper, + &_swigt__p_ddog_Tag, + &_swigt__p_ddog_TelemetryWorkerBuilder, + &_swigt__p_ddog_TelemetryWorkerBuilderBoolProperty, + &_swigt__p_ddog_TelemetryWorkerBuilderEndpointProperty, + &_swigt__p_ddog_TelemetryWorkerBuilderStrProperty, + &_swigt__p_ddog_TelemetryWorkerHandle, + &_swigt__p_ddog_Timespec, + &_swigt__p_ddog_Vec_Tag, + &_swigt__p_ddog_Vec_Tag_ParseResult, + &_swigt__p_ddog_Vec_Tag_PushResult, + &_swigt__p_ddog_Vec_Tag_PushResult_Tag, + &_swigt__p_ddog_Vec_U8, + &_swigt__p_ddog_prof_CrashInfo, + &_swigt__p_ddog_prof_CrashInfoNewResult, + &_swigt__p_ddog_prof_CrashInfoNewResult_Tag, + &_swigt__p_ddog_prof_CrashtrackerConfiguration, + &_swigt__p_ddog_prof_CrashtrackerMetadata, + &_swigt__p_ddog_prof_CrashtrackerReceiverConfig, + &_swigt__p_ddog_prof_CrashtrackerResult, + &_swigt__p_ddog_prof_CrashtrackerResult_Tag, + &_swigt__p_ddog_prof_DemangleOptions, + &_swigt__p_ddog_prof_EncodedProfile, + &_swigt__p_ddog_prof_Endpoint, + &_swigt__p_ddog_prof_Endpoint_Tag, + &_swigt__p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, + &_swigt__p_ddog_prof_EnvVar, + &_swigt__p_ddog_prof_Exporter, + &_swigt__p_ddog_prof_Exporter_File, + &_swigt__p_ddog_prof_Exporter_NewResult, + &_swigt__p_ddog_prof_Exporter_NewResult_Tag, + &_swigt__p_ddog_prof_Exporter_Request, + &_swigt__p_ddog_prof_Exporter_Request_BuildResult, + &_swigt__p_ddog_prof_Exporter_Request_BuildResult_Tag, + &_swigt__p_ddog_prof_Exporter_SendResult, + &_swigt__p_ddog_prof_Exporter_SendResult_Tag, + &_swigt__p_ddog_prof_Exporter_Slice_File, + &_swigt__p_ddog_prof_Function, + &_swigt__p_ddog_prof_Label, + &_swigt__p_ddog_prof_Location, + &_swigt__p_ddog_prof_Mapping, + &_swigt__p_ddog_prof_NormalizedAddress, + &_swigt__p_ddog_prof_NormalizedAddressTypes, + &_swigt__p_ddog_prof_Option_U32, + &_swigt__p_ddog_prof_Option_U32_Tag, + &_swigt__p_ddog_prof_Period, + &_swigt__p_ddog_prof_Profile, + &_swigt__p_ddog_prof_Profile_NewResult, + &_swigt__p_ddog_prof_Profile_NewResult_Tag, + &_swigt__p_ddog_prof_Profile_Result, + &_swigt__p_ddog_prof_Profile_Result_Tag, + &_swigt__p_ddog_prof_Profile_SerializeResult, + &_swigt__p_ddog_prof_Profile_SerializeResult_Tag, + &_swigt__p_ddog_prof_ProfiledEndpointsStats, + &_swigt__p_ddog_prof_ProfilingOpTypes, + &_swigt__p_ddog_prof_Sample, + &_swigt__p_ddog_prof_SigInfo, + &_swigt__p_ddog_prof_Slice_CharSlice, + &_swigt__p_ddog_prof_Slice_EnvVar, + &_swigt__p_ddog_prof_Slice_Label, + &_swigt__p_ddog_prof_Slice_Location, + &_swigt__p_ddog_prof_Slice_StackFrame, + &_swigt__p_ddog_prof_Slice_StackFrameNames, + &_swigt__p_ddog_prof_Slice_Usize, + &_swigt__p_ddog_prof_Slice_ValueType, + &_swigt__p_ddog_prof_StackFrame, + &_swigt__p_ddog_prof_StackFrameNames, + &_swigt__p_ddog_prof_StacktraceCollection, + &_swigt__p_ddog_prof_StringWrapper, + &_swigt__p_ddog_prof_StringWrapperResult, + &_swigt__p_ddog_prof_StringWrapperResult_Tag, + &_swigt__p_ddog_prof_ValueType, + &_swigt__p_int64_t, + &_swigt__p_p_ddog_Endpoint, + &_swigt__p_p_ddog_prof_Exporter_Request, + &_swigt__p_uint16_t, + &_swigt__p_uint32_t, + &_swigt__p_uint64_t, + &_swigt__p_uint8_t, + &_swigt__p_uintptr_t, +}; + +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_CancellationToken[] = { {&_swigt__p_ddog_CancellationToken, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_ConfigurationOrigin[] = { {&_swigt__p_ddog_ConfigurationOrigin, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_ContextKey[] = { {&_swigt__p_ddog_ContextKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Endpoint[] = { {&_swigt__p_ddog_Endpoint, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Error[] = { {&_swigt__p_ddog_Error, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_HttpStatus[] = { {&_swigt__p_ddog_HttpStatus, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_LogLevel[] = { {&_swigt__p_ddog_LogLevel, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_MetricNamespace[] = { {&_swigt__p_ddog_MetricNamespace, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_MetricType[] = { {&_swigt__p_ddog_MetricType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Option_Bool[] = { {&_swigt__p_ddog_Option_Bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Option_Bool_Tag[] = { {&_swigt__p_ddog_Option_Bool_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Option_Error[] = { {&_swigt__p_ddog_Option_Error, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Option_Error_Tag[] = { {&_swigt__p_ddog_Option_Error_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Slice_CChar[] = { {&_swigt__p_ddog_Slice_CChar, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Slice_I64[] = { {&_swigt__p_ddog_Slice_I64, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Slice_U8[] = { {&_swigt__p_ddog_Slice_U8, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_StringWrapper[] = { {&_swigt__p_ddog_StringWrapper, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Tag[] = { {&_swigt__p_ddog_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_TelemetryWorkerBuilder[] = { {&_swigt__p_ddog_TelemetryWorkerBuilder, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_TelemetryWorkerBuilderBoolProperty[] = { {&_swigt__p_ddog_TelemetryWorkerBuilderBoolProperty, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_TelemetryWorkerBuilderEndpointProperty[] = { {&_swigt__p_ddog_TelemetryWorkerBuilderEndpointProperty, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_TelemetryWorkerBuilderStrProperty[] = { {&_swigt__p_ddog_TelemetryWorkerBuilderStrProperty, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_TelemetryWorkerHandle[] = { {&_swigt__p_ddog_TelemetryWorkerHandle, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Timespec[] = { {&_swigt__p_ddog_Timespec, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Vec_Tag[] = { {&_swigt__p_ddog_Vec_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Vec_Tag_ParseResult[] = { {&_swigt__p_ddog_Vec_Tag_ParseResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Vec_Tag_PushResult[] = { {&_swigt__p_ddog_Vec_Tag_PushResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Vec_Tag_PushResult_Tag[] = { {&_swigt__p_ddog_Vec_Tag_PushResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_Vec_U8[] = { {&_swigt__p_ddog_Vec_U8, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashInfo[] = { {&_swigt__p_ddog_prof_CrashInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashInfoNewResult[] = { {&_swigt__p_ddog_prof_CrashInfoNewResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashInfoNewResult_Tag[] = { {&_swigt__p_ddog_prof_CrashInfoNewResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashtrackerConfiguration[] = { {&_swigt__p_ddog_prof_CrashtrackerConfiguration, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashtrackerMetadata[] = { {&_swigt__p_ddog_prof_CrashtrackerMetadata, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashtrackerReceiverConfig[] = { {&_swigt__p_ddog_prof_CrashtrackerReceiverConfig, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashtrackerResult[] = { {&_swigt__p_ddog_prof_CrashtrackerResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_CrashtrackerResult_Tag[] = { {&_swigt__p_ddog_prof_CrashtrackerResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_DemangleOptions[] = { {&_swigt__p_ddog_prof_DemangleOptions, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_EncodedProfile[] = { {&_swigt__p_ddog_prof_EncodedProfile, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Endpoint[] = { {&_swigt__p_ddog_prof_Endpoint, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Endpoint_Tag[] = { {&_swigt__p_ddog_prof_Endpoint_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Endpoint_ddog_prof_Agentless_Body[] = { {&_swigt__p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_EnvVar[] = { {&_swigt__p_ddog_prof_EnvVar, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter[] = { {&_swigt__p_ddog_prof_Exporter, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_File[] = { {&_swigt__p_ddog_prof_Exporter_File, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_NewResult[] = { {&_swigt__p_ddog_prof_Exporter_NewResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_NewResult_Tag[] = { {&_swigt__p_ddog_prof_Exporter_NewResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_Request[] = { {&_swigt__p_ddog_prof_Exporter_Request, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_Request_BuildResult[] = { {&_swigt__p_ddog_prof_Exporter_Request_BuildResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_Request_BuildResult_Tag[] = { {&_swigt__p_ddog_prof_Exporter_Request_BuildResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_SendResult[] = { {&_swigt__p_ddog_prof_Exporter_SendResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_SendResult_Tag[] = { {&_swigt__p_ddog_prof_Exporter_SendResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Exporter_Slice_File[] = { {&_swigt__p_ddog_prof_Exporter_Slice_File, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Function[] = { {&_swigt__p_ddog_prof_Function, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Label[] = { {&_swigt__p_ddog_prof_Label, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Location[] = { {&_swigt__p_ddog_prof_Location, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Mapping[] = { {&_swigt__p_ddog_prof_Mapping, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_NormalizedAddress[] = { {&_swigt__p_ddog_prof_NormalizedAddress, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_NormalizedAddressTypes[] = { {&_swigt__p_ddog_prof_NormalizedAddressTypes, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Option_U32[] = { {&_swigt__p_ddog_prof_Option_U32, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Option_U32_Tag[] = { {&_swigt__p_ddog_prof_Option_U32_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Period[] = { {&_swigt__p_ddog_prof_Period, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile[] = { {&_swigt__p_ddog_prof_Profile, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_NewResult[] = { {&_swigt__p_ddog_prof_Profile_NewResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_NewResult_Tag[] = { {&_swigt__p_ddog_prof_Profile_NewResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_Result[] = { {&_swigt__p_ddog_prof_Profile_Result, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_Result_Tag[] = { {&_swigt__p_ddog_prof_Profile_Result_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_SerializeResult[] = { {&_swigt__p_ddog_prof_Profile_SerializeResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Profile_SerializeResult_Tag[] = { {&_swigt__p_ddog_prof_Profile_SerializeResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_ProfiledEndpointsStats[] = { {&_swigt__p_ddog_prof_ProfiledEndpointsStats, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_ProfilingOpTypes[] = { {&_swigt__p_ddog_prof_ProfilingOpTypes, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Sample[] = { {&_swigt__p_ddog_prof_Sample, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_SigInfo[] = { {&_swigt__p_ddog_prof_SigInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_CharSlice[] = { {&_swigt__p_ddog_prof_Slice_CharSlice, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_EnvVar[] = { {&_swigt__p_ddog_prof_Slice_EnvVar, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_Label[] = { {&_swigt__p_ddog_prof_Slice_Label, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_Location[] = { {&_swigt__p_ddog_prof_Slice_Location, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_StackFrame[] = { {&_swigt__p_ddog_prof_Slice_StackFrame, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_StackFrameNames[] = { {&_swigt__p_ddog_prof_Slice_StackFrameNames, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_Usize[] = { {&_swigt__p_ddog_prof_Slice_Usize, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_Slice_ValueType[] = { {&_swigt__p_ddog_prof_Slice_ValueType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StackFrame[] = { {&_swigt__p_ddog_prof_StackFrame, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StackFrameNames[] = { {&_swigt__p_ddog_prof_StackFrameNames, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StacktraceCollection[] = { {&_swigt__p_ddog_prof_StacktraceCollection, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StringWrapper[] = { {&_swigt__p_ddog_prof_StringWrapper, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StringWrapperResult[] = { {&_swigt__p_ddog_prof_StringWrapperResult, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_StringWrapperResult_Tag[] = { {&_swigt__p_ddog_prof_StringWrapperResult_Tag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ddog_prof_ValueType[] = { {&_swigt__p_ddog_prof_ValueType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_ddog_Endpoint[] = { {&_swigt__p_p_ddog_Endpoint, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_ddog_prof_Exporter_Request[] = { {&_swigt__p_p_ddog_prof_Exporter_Request, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint16_t[] = { {&_swigt__p_uint16_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint64_t[] = { {&_swigt__p_uint64_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uint8_t[] = { {&_swigt__p_uint8_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_uintptr_t[] = { {&_swigt__p_uintptr_t, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_char, + _swigc__p_ddog_CancellationToken, + _swigc__p_ddog_ConfigurationOrigin, + _swigc__p_ddog_ContextKey, + _swigc__p_ddog_Endpoint, + _swigc__p_ddog_Error, + _swigc__p_ddog_HttpStatus, + _swigc__p_ddog_LogLevel, + _swigc__p_ddog_MetricNamespace, + _swigc__p_ddog_MetricType, + _swigc__p_ddog_Option_Bool, + _swigc__p_ddog_Option_Bool_Tag, + _swigc__p_ddog_Option_Error, + _swigc__p_ddog_Option_Error_Tag, + _swigc__p_ddog_Slice_CChar, + _swigc__p_ddog_Slice_I64, + _swigc__p_ddog_Slice_U8, + _swigc__p_ddog_StringWrapper, + _swigc__p_ddog_Tag, + _swigc__p_ddog_TelemetryWorkerBuilder, + _swigc__p_ddog_TelemetryWorkerBuilderBoolProperty, + _swigc__p_ddog_TelemetryWorkerBuilderEndpointProperty, + _swigc__p_ddog_TelemetryWorkerBuilderStrProperty, + _swigc__p_ddog_TelemetryWorkerHandle, + _swigc__p_ddog_Timespec, + _swigc__p_ddog_Vec_Tag, + _swigc__p_ddog_Vec_Tag_ParseResult, + _swigc__p_ddog_Vec_Tag_PushResult, + _swigc__p_ddog_Vec_Tag_PushResult_Tag, + _swigc__p_ddog_Vec_U8, + _swigc__p_ddog_prof_CrashInfo, + _swigc__p_ddog_prof_CrashInfoNewResult, + _swigc__p_ddog_prof_CrashInfoNewResult_Tag, + _swigc__p_ddog_prof_CrashtrackerConfiguration, + _swigc__p_ddog_prof_CrashtrackerMetadata, + _swigc__p_ddog_prof_CrashtrackerReceiverConfig, + _swigc__p_ddog_prof_CrashtrackerResult, + _swigc__p_ddog_prof_CrashtrackerResult_Tag, + _swigc__p_ddog_prof_DemangleOptions, + _swigc__p_ddog_prof_EncodedProfile, + _swigc__p_ddog_prof_Endpoint, + _swigc__p_ddog_prof_Endpoint_Tag, + _swigc__p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, + _swigc__p_ddog_prof_EnvVar, + _swigc__p_ddog_prof_Exporter, + _swigc__p_ddog_prof_Exporter_File, + _swigc__p_ddog_prof_Exporter_NewResult, + _swigc__p_ddog_prof_Exporter_NewResult_Tag, + _swigc__p_ddog_prof_Exporter_Request, + _swigc__p_ddog_prof_Exporter_Request_BuildResult, + _swigc__p_ddog_prof_Exporter_Request_BuildResult_Tag, + _swigc__p_ddog_prof_Exporter_SendResult, + _swigc__p_ddog_prof_Exporter_SendResult_Tag, + _swigc__p_ddog_prof_Exporter_Slice_File, + _swigc__p_ddog_prof_Function, + _swigc__p_ddog_prof_Label, + _swigc__p_ddog_prof_Location, + _swigc__p_ddog_prof_Mapping, + _swigc__p_ddog_prof_NormalizedAddress, + _swigc__p_ddog_prof_NormalizedAddressTypes, + _swigc__p_ddog_prof_Option_U32, + _swigc__p_ddog_prof_Option_U32_Tag, + _swigc__p_ddog_prof_Period, + _swigc__p_ddog_prof_Profile, + _swigc__p_ddog_prof_Profile_NewResult, + _swigc__p_ddog_prof_Profile_NewResult_Tag, + _swigc__p_ddog_prof_Profile_Result, + _swigc__p_ddog_prof_Profile_Result_Tag, + _swigc__p_ddog_prof_Profile_SerializeResult, + _swigc__p_ddog_prof_Profile_SerializeResult_Tag, + _swigc__p_ddog_prof_ProfiledEndpointsStats, + _swigc__p_ddog_prof_ProfilingOpTypes, + _swigc__p_ddog_prof_Sample, + _swigc__p_ddog_prof_SigInfo, + _swigc__p_ddog_prof_Slice_CharSlice, + _swigc__p_ddog_prof_Slice_EnvVar, + _swigc__p_ddog_prof_Slice_Label, + _swigc__p_ddog_prof_Slice_Location, + _swigc__p_ddog_prof_Slice_StackFrame, + _swigc__p_ddog_prof_Slice_StackFrameNames, + _swigc__p_ddog_prof_Slice_Usize, + _swigc__p_ddog_prof_Slice_ValueType, + _swigc__p_ddog_prof_StackFrame, + _swigc__p_ddog_prof_StackFrameNames, + _swigc__p_ddog_prof_StacktraceCollection, + _swigc__p_ddog_prof_StringWrapper, + _swigc__p_ddog_prof_StringWrapperResult, + _swigc__p_ddog_prof_StringWrapperResult_Tag, + _swigc__p_ddog_prof_ValueType, + _swigc__p_int64_t, + _swigc__p_p_ddog_Endpoint, + _swigc__p_p_ddog_prof_Exporter_Request, + _swigc__p_uint16_t, + _swigc__p_uint32_t, + _swigc__p_uint64_t, + _swigc__p_uint8_t, + _swigc__p_uintptr_t, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + +#ifndef SWIG_INIT_CLIENT_DATA_TYPE +#define SWIG_INIT_CLIENT_DATA_TYPE void * +#endif + +SWIGRUNTIME void +SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + +/* + +*/ +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void Init_libdatadog_ruby(void) { + size_t i; + + SWIG_InitRuntime(); + mLibdatadog_ruby = rb_define_module("Libdatadog_ruby"); + + SWIG_InitializeModule(0); + for (i = 0; i < swig_module.size; i++) { + SWIG_define_class(swig_module.types[i]); + } + + SWIG_RubyInitializeTrackings(); + + SwigClassDdog_Vec_U8.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Vec_U8", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Vec_U8, (void *) &SwigClassDdog_Vec_U8); + rb_define_alloc_func(SwigClassDdog_Vec_U8.klass, _wrap_ddog_Vec_U8_allocate); + rb_define_method(SwigClassDdog_Vec_U8.klass, "initialize", _wrap_new_ddog_Vec_U8, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "ptr=", _wrap_ddog_Vec_U8_ptr_set, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "ptr", _wrap_ddog_Vec_U8_ptr_get, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "len=", _wrap_ddog_Vec_U8_len_set, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "len", _wrap_ddog_Vec_U8_len_get, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "capacity=", _wrap_ddog_Vec_U8_capacity_set, -1); + rb_define_method(SwigClassDdog_Vec_U8.klass, "capacity", _wrap_ddog_Vec_U8_capacity_get, -1); + SwigClassDdog_Vec_U8.mark = 0; + SwigClassDdog_Vec_U8.destroy = (void (*)(void *)) free_ddog_Vec_U8; + SwigClassDdog_Vec_U8.trackObjects = 0; + + SwigClassDdog_Error.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Error", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Error, (void *) &SwigClassDdog_Error); + rb_define_alloc_func(SwigClassDdog_Error.klass, _wrap_ddog_Error_allocate); + rb_define_method(SwigClassDdog_Error.klass, "initialize", _wrap_new_ddog_Error, -1); + rb_define_method(SwigClassDdog_Error.klass, "message=", _wrap_ddog_Error_message_set, -1); + rb_define_method(SwigClassDdog_Error.klass, "message", _wrap_ddog_Error_message_get, -1); + SwigClassDdog_Error.mark = 0; + SwigClassDdog_Error.destroy = (void (*)(void *)) free_ddog_Error; + SwigClassDdog_Error.trackObjects = 0; + + SwigClassDdog_Slice_CChar.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Slice_CChar", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Slice_CChar, (void *) &SwigClassDdog_Slice_CChar); + rb_define_alloc_func(SwigClassDdog_Slice_CChar.klass, _wrap_ddog_Slice_CChar_allocate); + rb_define_method(SwigClassDdog_Slice_CChar.klass, "initialize", _wrap_new_ddog_Slice_CChar, -1); + rb_define_method(SwigClassDdog_Slice_CChar.klass, "ptr=", _wrap_ddog_Slice_CChar_ptr_set, -1); + rb_define_method(SwigClassDdog_Slice_CChar.klass, "ptr", _wrap_ddog_Slice_CChar_ptr_get, -1); + rb_define_method(SwigClassDdog_Slice_CChar.klass, "len=", _wrap_ddog_Slice_CChar_len_set, -1); + rb_define_method(SwigClassDdog_Slice_CChar.klass, "len", _wrap_ddog_Slice_CChar_len_get, -1); + SwigClassDdog_Slice_CChar.mark = 0; + SwigClassDdog_Slice_CChar.destroy = (void (*)(void *)) free_ddog_Slice_CChar; + SwigClassDdog_Slice_CChar.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_OPTION_ERROR_SOME_ERROR", SWIG_From_int((int)(DDOG_OPTION_ERROR_SOME_ERROR))); + rb_define_const(mLibdatadog_ruby, "DDOG_OPTION_ERROR_NONE_ERROR", SWIG_From_int((int)(DDOG_OPTION_ERROR_NONE_ERROR))); + + SwigClassDdog_Option_Error.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Option_Error", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Option_Error, (void *) &SwigClassDdog_Option_Error); + rb_define_alloc_func(SwigClassDdog_Option_Error.klass, _wrap_ddog_Option_Error_allocate); + rb_define_method(SwigClassDdog_Option_Error.klass, "initialize", _wrap_new_ddog_Option_Error, -1); + rb_define_method(SwigClassDdog_Option_Error.klass, "tag=", _wrap_ddog_Option_Error_tag_set, -1); + rb_define_method(SwigClassDdog_Option_Error.klass, "tag", _wrap_ddog_Option_Error_tag_get, -1); + rb_define_method(SwigClassDdog_Option_Error.klass, "some=", _wrap_ddog_Option_Error_some_set, -1); + rb_define_method(SwigClassDdog_Option_Error.klass, "some", _wrap_ddog_Option_Error_some_get, -1); + SwigClassDdog_Option_Error.mark = 0; + SwigClassDdog_Option_Error.destroy = (void (*)(void *)) free_ddog_Option_Error; + SwigClassDdog_Option_Error.trackObjects = 0; + + SwigClassDdog_StringWrapper.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_StringWrapper", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_StringWrapper, (void *) &SwigClassDdog_StringWrapper); + rb_define_alloc_func(SwigClassDdog_StringWrapper.klass, _wrap_ddog_StringWrapper_allocate); + rb_define_method(SwigClassDdog_StringWrapper.klass, "initialize", _wrap_new_ddog_StringWrapper, -1); + rb_define_method(SwigClassDdog_StringWrapper.klass, "message=", _wrap_ddog_StringWrapper_message_set, -1); + rb_define_method(SwigClassDdog_StringWrapper.klass, "message", _wrap_ddog_StringWrapper_message_get, -1); + SwigClassDdog_StringWrapper.mark = 0; + SwigClassDdog_StringWrapper.destroy = (void (*)(void *)) free_ddog_StringWrapper; + SwigClassDdog_StringWrapper.trackObjects = 0; + + SwigClassDdog_Vec_Tag.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Vec_Tag", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Vec_Tag, (void *) &SwigClassDdog_Vec_Tag); + rb_define_alloc_func(SwigClassDdog_Vec_Tag.klass, _wrap_ddog_Vec_Tag_allocate); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "initialize", _wrap_new_ddog_Vec_Tag, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "ptr=", _wrap_ddog_Vec_Tag_ptr_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "ptr", _wrap_ddog_Vec_Tag_ptr_get, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "len=", _wrap_ddog_Vec_Tag_len_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "len", _wrap_ddog_Vec_Tag_len_get, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "capacity=", _wrap_ddog_Vec_Tag_capacity_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag.klass, "capacity", _wrap_ddog_Vec_Tag_capacity_get, -1); + SwigClassDdog_Vec_Tag.mark = 0; + SwigClassDdog_Vec_Tag.destroy = (void (*)(void *)) free_ddog_Vec_Tag; + SwigClassDdog_Vec_Tag.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_VEC_TAG_PUSH_RESULT_OK", SWIG_From_int((int)(DDOG_VEC_TAG_PUSH_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_VEC_TAG_PUSH_RESULT_ERR", SWIG_From_int((int)(DDOG_VEC_TAG_PUSH_RESULT_ERR))); + + SwigClassDdog_Vec_Tag_PushResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Vec_Tag_PushResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Vec_Tag_PushResult, (void *) &SwigClassDdog_Vec_Tag_PushResult); + rb_define_alloc_func(SwigClassDdog_Vec_Tag_PushResult.klass, _wrap_ddog_Vec_Tag_PushResult_allocate); + rb_define_method(SwigClassDdog_Vec_Tag_PushResult.klass, "initialize", _wrap_new_ddog_Vec_Tag_PushResult, -1); + rb_define_method(SwigClassDdog_Vec_Tag_PushResult.klass, "tag=", _wrap_ddog_Vec_Tag_PushResult_tag_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag_PushResult.klass, "tag", _wrap_ddog_Vec_Tag_PushResult_tag_get, -1); + rb_define_method(SwigClassDdog_Vec_Tag_PushResult.klass, "err=", _wrap_ddog_Vec_Tag_PushResult_err_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag_PushResult.klass, "err", _wrap_ddog_Vec_Tag_PushResult_err_get, -1); + SwigClassDdog_Vec_Tag_PushResult.mark = 0; + SwigClassDdog_Vec_Tag_PushResult.destroy = (void (*)(void *)) free_ddog_Vec_Tag_PushResult; + SwigClassDdog_Vec_Tag_PushResult.trackObjects = 0; + + SwigClassDdog_Vec_Tag_ParseResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Vec_Tag_ParseResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Vec_Tag_ParseResult, (void *) &SwigClassDdog_Vec_Tag_ParseResult); + rb_define_alloc_func(SwigClassDdog_Vec_Tag_ParseResult.klass, _wrap_ddog_Vec_Tag_ParseResult_allocate); + rb_define_method(SwigClassDdog_Vec_Tag_ParseResult.klass, "initialize", _wrap_new_ddog_Vec_Tag_ParseResult, -1); + rb_define_method(SwigClassDdog_Vec_Tag_ParseResult.klass, "tags=", _wrap_ddog_Vec_Tag_ParseResult_tags_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag_ParseResult.klass, "tags", _wrap_ddog_Vec_Tag_ParseResult_tags_get, -1); + rb_define_method(SwigClassDdog_Vec_Tag_ParseResult.klass, "error_message=", _wrap_ddog_Vec_Tag_ParseResult_error_message_set, -1); + rb_define_method(SwigClassDdog_Vec_Tag_ParseResult.klass, "error_message", _wrap_ddog_Vec_Tag_ParseResult_error_message_get, -1); + SwigClassDdog_Vec_Tag_ParseResult.mark = 0; + SwigClassDdog_Vec_Tag_ParseResult.destroy = (void (*)(void *)) free_ddog_Vec_Tag_ParseResult; + SwigClassDdog_Vec_Tag_ParseResult.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_DEMANGLE_OPTIONS_COMPLETE", SWIG_From_int((int)(DDOG_PROF_DEMANGLE_OPTIONS_COMPLETE))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_DEMANGLE_OPTIONS_NAME_ONLY", SWIG_From_int((int)(DDOG_PROF_DEMANGLE_OPTIONS_NAME_ONLY))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_NORMALIZED_ADDRESS_TYPES_NONE", SWIG_From_int((int)(DDOG_PROF_NORMALIZED_ADDRESS_TYPES_NONE))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_NORMALIZED_ADDRESS_TYPES_ELF", SWIG_From_int((int)(DDOG_PROF_NORMALIZED_ADDRESS_TYPES_ELF))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILING_OP_TYPES_NOT_PROFILING", SWIG_From_int((int)(DDOG_PROF_PROFILING_OP_TYPES_NOT_PROFILING))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILING_OP_TYPES_COLLECTING_SAMPLE", SWIG_From_int((int)(DDOG_PROF_PROFILING_OP_TYPES_COLLECTING_SAMPLE))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILING_OP_TYPES_UNWINDING", SWIG_From_int((int)(DDOG_PROF_PROFILING_OP_TYPES_UNWINDING))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILING_OP_TYPES_SERIALIZING", SWIG_From_int((int)(DDOG_PROF_PROFILING_OP_TYPES_SERIALIZING))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILING_OP_TYPES_SIZE", SWIG_From_int((int)(DDOG_PROF_PROFILING_OP_TYPES_SIZE))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STACKTRACE_COLLECTION_DISABLED", SWIG_From_int((int)(DDOG_PROF_STACKTRACE_COLLECTION_DISABLED))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STACKTRACE_COLLECTION_WITHOUT_SYMBOLS", SWIG_From_int((int)(DDOG_PROF_STACKTRACE_COLLECTION_WITHOUT_SYMBOLS))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS", SWIG_From_int((int)(DDOG_PROF_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER", SWIG_From_int((int)(DDOG_PROF_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_CRASHTRACKER_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_CRASHTRACKER_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_CRASHTRACKER_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_CRASHTRACKER_RESULT_ERR))); + + SwigClassDdog_prof_CrashtrackerResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashtrackerResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashtrackerResult, (void *) &SwigClassDdog_prof_CrashtrackerResult); + rb_define_alloc_func(SwigClassDdog_prof_CrashtrackerResult.klass, _wrap_ddog_prof_CrashtrackerResult_allocate); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "initialize", _wrap_new_ddog_prof_CrashtrackerResult, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "tag=", _wrap_ddog_prof_CrashtrackerResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "tag", _wrap_ddog_prof_CrashtrackerResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "ok=", _wrap_ddog_prof_CrashtrackerResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "ok", _wrap_ddog_prof_CrashtrackerResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "err=", _wrap_ddog_prof_CrashtrackerResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerResult.klass, "err", _wrap_ddog_prof_CrashtrackerResult_err_get, -1); + SwigClassDdog_prof_CrashtrackerResult.mark = 0; + SwigClassDdog_prof_CrashtrackerResult.destroy = (void (*)(void *)) free_ddog_prof_CrashtrackerResult; + SwigClassDdog_prof_CrashtrackerResult.trackObjects = 0; + + SwigClassDdog_prof_Slice_CharSlice.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_CharSlice", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_CharSlice, (void *) &SwigClassDdog_prof_Slice_CharSlice); + rb_define_alloc_func(SwigClassDdog_prof_Slice_CharSlice.klass, _wrap_ddog_prof_Slice_CharSlice_allocate); + rb_define_method(SwigClassDdog_prof_Slice_CharSlice.klass, "initialize", _wrap_new_ddog_prof_Slice_CharSlice, -1); + rb_define_method(SwigClassDdog_prof_Slice_CharSlice.klass, "ptr=", _wrap_ddog_prof_Slice_CharSlice_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_CharSlice.klass, "ptr", _wrap_ddog_prof_Slice_CharSlice_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_CharSlice.klass, "len=", _wrap_ddog_prof_Slice_CharSlice_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_CharSlice.klass, "len", _wrap_ddog_prof_Slice_CharSlice_len_get, -1); + SwigClassDdog_prof_Slice_CharSlice.mark = 0; + SwigClassDdog_prof_Slice_CharSlice.destroy = (void (*)(void *)) free_ddog_prof_Slice_CharSlice; + SwigClassDdog_prof_Slice_CharSlice.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_ENDPOINT_AGENT", SWIG_From_int((int)(DDOG_PROF_ENDPOINT_AGENT))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_ENDPOINT_AGENTLESS", SWIG_From_int((int)(DDOG_PROF_ENDPOINT_AGENTLESS))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_ENDPOINT_FILE", SWIG_From_int((int)(DDOG_PROF_ENDPOINT_FILE))); + + SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Endpoint_ddog_prof_Agentless_Body", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Endpoint_ddog_prof_Agentless_Body, (void *) &SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body); + rb_define_alloc_func(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, _wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body_allocate); + rb_define_method(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, "initialize", _wrap_new_ddog_prof_Endpoint_ddog_prof_Agentless_Body, -1); + rb_define_method(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, "_0=", _wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__0_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, "_0", _wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__0_get, -1); + rb_define_method(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, "_1=", _wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__1_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.klass, "_1", _wrap_ddog_prof_Endpoint_ddog_prof_Agentless_Body__1_get, -1); + SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.mark = 0; + SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.destroy = (void (*)(void *)) free_ddog_prof_Endpoint_ddog_prof_Agentless_Body; + SwigClassDdog_prof_Endpoint_ddog_prof_Agentless_Body.trackObjects = 0; + + SwigClassDdog_prof_Endpoint.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Endpoint", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Endpoint, (void *) &SwigClassDdog_prof_Endpoint); + rb_define_alloc_func(SwigClassDdog_prof_Endpoint.klass, _wrap_ddog_prof_Endpoint_allocate); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "initialize", _wrap_new_ddog_prof_Endpoint, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "tag=", _wrap_ddog_prof_Endpoint_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "tag", _wrap_ddog_prof_Endpoint_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "agent=", _wrap_ddog_prof_Endpoint_agent_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "agent", _wrap_ddog_prof_Endpoint_agent_get, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "AGENTLESS=", _wrap_ddog_prof_Endpoint_AGENTLESS_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "AGENTLESS", _wrap_ddog_prof_Endpoint_AGENTLESS_get, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "file=", _wrap_ddog_prof_Endpoint_file_set, -1); + rb_define_method(SwigClassDdog_prof_Endpoint.klass, "file", _wrap_ddog_prof_Endpoint_file_get, -1); + SwigClassDdog_prof_Endpoint.mark = 0; + SwigClassDdog_prof_Endpoint.destroy = (void (*)(void *)) free_ddog_prof_Endpoint; + SwigClassDdog_prof_Endpoint.trackObjects = 0; + + SwigClassDdog_prof_CrashtrackerConfiguration.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashtrackerConfiguration", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashtrackerConfiguration, (void *) &SwigClassDdog_prof_CrashtrackerConfiguration); + rb_define_alloc_func(SwigClassDdog_prof_CrashtrackerConfiguration.klass, _wrap_ddog_prof_CrashtrackerConfiguration_allocate); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "initialize", _wrap_new_ddog_prof_CrashtrackerConfiguration, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "additional_files=", _wrap_ddog_prof_CrashtrackerConfiguration_additional_files_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "additional_files", _wrap_ddog_prof_CrashtrackerConfiguration_additional_files_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "create_alt_stack=", _wrap_ddog_prof_CrashtrackerConfiguration_create_alt_stack_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "create_alt_stack", _wrap_ddog_prof_CrashtrackerConfiguration_create_alt_stack_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "endpoint=", _wrap_ddog_prof_CrashtrackerConfiguration_endpoint_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "endpoint", _wrap_ddog_prof_CrashtrackerConfiguration_endpoint_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "resolve_frames=", _wrap_ddog_prof_CrashtrackerConfiguration_resolve_frames_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "resolve_frames", _wrap_ddog_prof_CrashtrackerConfiguration_resolve_frames_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "timeout_secs=", _wrap_ddog_prof_CrashtrackerConfiguration_timeout_secs_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "timeout_secs", _wrap_ddog_prof_CrashtrackerConfiguration_timeout_secs_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "wait_for_receiver=", _wrap_ddog_prof_CrashtrackerConfiguration_wait_for_receiver_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerConfiguration.klass, "wait_for_receiver", _wrap_ddog_prof_CrashtrackerConfiguration_wait_for_receiver_get, -1); + SwigClassDdog_prof_CrashtrackerConfiguration.mark = 0; + SwigClassDdog_prof_CrashtrackerConfiguration.destroy = (void (*)(void *)) free_ddog_prof_CrashtrackerConfiguration; + SwigClassDdog_prof_CrashtrackerConfiguration.trackObjects = 0; + + SwigClassDdog_prof_EnvVar.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_EnvVar", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_EnvVar, (void *) &SwigClassDdog_prof_EnvVar); + rb_define_alloc_func(SwigClassDdog_prof_EnvVar.klass, _wrap_ddog_prof_EnvVar_allocate); + rb_define_method(SwigClassDdog_prof_EnvVar.klass, "initialize", _wrap_new_ddog_prof_EnvVar, -1); + rb_define_method(SwigClassDdog_prof_EnvVar.klass, "key=", _wrap_ddog_prof_EnvVar_key_set, -1); + rb_define_method(SwigClassDdog_prof_EnvVar.klass, "key", _wrap_ddog_prof_EnvVar_key_get, -1); + rb_define_method(SwigClassDdog_prof_EnvVar.klass, "val=", _wrap_ddog_prof_EnvVar_val_set, -1); + rb_define_method(SwigClassDdog_prof_EnvVar.klass, "val", _wrap_ddog_prof_EnvVar_val_get, -1); + SwigClassDdog_prof_EnvVar.mark = 0; + SwigClassDdog_prof_EnvVar.destroy = (void (*)(void *)) free_ddog_prof_EnvVar; + SwigClassDdog_prof_EnvVar.trackObjects = 0; + + SwigClassDdog_prof_Slice_EnvVar.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_EnvVar", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_EnvVar, (void *) &SwigClassDdog_prof_Slice_EnvVar); + rb_define_alloc_func(SwigClassDdog_prof_Slice_EnvVar.klass, _wrap_ddog_prof_Slice_EnvVar_allocate); + rb_define_method(SwigClassDdog_prof_Slice_EnvVar.klass, "initialize", _wrap_new_ddog_prof_Slice_EnvVar, -1); + rb_define_method(SwigClassDdog_prof_Slice_EnvVar.klass, "ptr=", _wrap_ddog_prof_Slice_EnvVar_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_EnvVar.klass, "ptr", _wrap_ddog_prof_Slice_EnvVar_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_EnvVar.klass, "len=", _wrap_ddog_prof_Slice_EnvVar_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_EnvVar.klass, "len", _wrap_ddog_prof_Slice_EnvVar_len_get, -1); + SwigClassDdog_prof_Slice_EnvVar.mark = 0; + SwigClassDdog_prof_Slice_EnvVar.destroy = (void (*)(void *)) free_ddog_prof_Slice_EnvVar; + SwigClassDdog_prof_Slice_EnvVar.trackObjects = 0; + + SwigClassDdog_prof_CrashtrackerReceiverConfig.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashtrackerReceiverConfig", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashtrackerReceiverConfig, (void *) &SwigClassDdog_prof_CrashtrackerReceiverConfig); + rb_define_alloc_func(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, _wrap_ddog_prof_CrashtrackerReceiverConfig_allocate); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "initialize", _wrap_new_ddog_prof_CrashtrackerReceiverConfig, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "args=", _wrap_ddog_prof_CrashtrackerReceiverConfig_args_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "args", _wrap_ddog_prof_CrashtrackerReceiverConfig_args_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "env=", _wrap_ddog_prof_CrashtrackerReceiverConfig_env_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "env", _wrap_ddog_prof_CrashtrackerReceiverConfig_env_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "path_to_receiver_binary=", _wrap_ddog_prof_CrashtrackerReceiverConfig_path_to_receiver_binary_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "path_to_receiver_binary", _wrap_ddog_prof_CrashtrackerReceiverConfig_path_to_receiver_binary_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "optional_stderr_filename=", _wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stderr_filename_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "optional_stderr_filename", _wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stderr_filename_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "optional_stdout_filename=", _wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stdout_filename_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerReceiverConfig.klass, "optional_stdout_filename", _wrap_ddog_prof_CrashtrackerReceiverConfig_optional_stdout_filename_get, -1); + SwigClassDdog_prof_CrashtrackerReceiverConfig.mark = 0; + SwigClassDdog_prof_CrashtrackerReceiverConfig.destroy = (void (*)(void *)) free_ddog_prof_CrashtrackerReceiverConfig; + SwigClassDdog_prof_CrashtrackerReceiverConfig.trackObjects = 0; + + SwigClassDdog_prof_CrashtrackerMetadata.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashtrackerMetadata", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashtrackerMetadata, (void *) &SwigClassDdog_prof_CrashtrackerMetadata); + rb_define_alloc_func(SwigClassDdog_prof_CrashtrackerMetadata.klass, _wrap_ddog_prof_CrashtrackerMetadata_allocate); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "initialize", _wrap_new_ddog_prof_CrashtrackerMetadata, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "profiling_library_name=", _wrap_ddog_prof_CrashtrackerMetadata_profiling_library_name_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "profiling_library_name", _wrap_ddog_prof_CrashtrackerMetadata_profiling_library_name_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "profiling_library_version=", _wrap_ddog_prof_CrashtrackerMetadata_profiling_library_version_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "profiling_library_version", _wrap_ddog_prof_CrashtrackerMetadata_profiling_library_version_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "family=", _wrap_ddog_prof_CrashtrackerMetadata_family_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "family", _wrap_ddog_prof_CrashtrackerMetadata_family_get, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "tags=", _wrap_ddog_prof_CrashtrackerMetadata_tags_set, -1); + rb_define_method(SwigClassDdog_prof_CrashtrackerMetadata.klass, "tags", _wrap_ddog_prof_CrashtrackerMetadata_tags_get, -1); + SwigClassDdog_prof_CrashtrackerMetadata.mark = 0; + SwigClassDdog_prof_CrashtrackerMetadata.destroy = (void (*)(void *)) free_ddog_prof_CrashtrackerMetadata; + SwigClassDdog_prof_CrashtrackerMetadata.trackObjects = 0; + + SwigClassDdog_prof_CrashInfo.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashInfo", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashInfo, (void *) &SwigClassDdog_prof_CrashInfo); + rb_define_alloc_func(SwigClassDdog_prof_CrashInfo.klass, _wrap_ddog_prof_CrashInfo_allocate); + rb_define_method(SwigClassDdog_prof_CrashInfo.klass, "initialize", _wrap_new_ddog_prof_CrashInfo, -1); + rb_define_method(SwigClassDdog_prof_CrashInfo.klass, "inner=", _wrap_ddog_prof_CrashInfo_inner_set, -1); + rb_define_method(SwigClassDdog_prof_CrashInfo.klass, "inner", _wrap_ddog_prof_CrashInfo_inner_get, -1); + SwigClassDdog_prof_CrashInfo.mark = 0; + SwigClassDdog_prof_CrashInfo.destroy = (void (*)(void *)) free_ddog_prof_CrashInfo; + SwigClassDdog_prof_CrashInfo.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_CRASH_INFO_NEW_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_CRASH_INFO_NEW_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_CRASH_INFO_NEW_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_CRASH_INFO_NEW_RESULT_ERR))); + + SwigClassDdog_prof_CrashInfoNewResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_CrashInfoNewResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_CrashInfoNewResult, (void *) &SwigClassDdog_prof_CrashInfoNewResult); + rb_define_alloc_func(SwigClassDdog_prof_CrashInfoNewResult.klass, _wrap_ddog_prof_CrashInfoNewResult_allocate); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "initialize", _wrap_new_ddog_prof_CrashInfoNewResult, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "tag=", _wrap_ddog_prof_CrashInfoNewResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "tag", _wrap_ddog_prof_CrashInfoNewResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "ok=", _wrap_ddog_prof_CrashInfoNewResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "ok", _wrap_ddog_prof_CrashInfoNewResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "err=", _wrap_ddog_prof_CrashInfoNewResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_CrashInfoNewResult.klass, "err", _wrap_ddog_prof_CrashInfoNewResult_err_get, -1); + SwigClassDdog_prof_CrashInfoNewResult.mark = 0; + SwigClassDdog_prof_CrashInfoNewResult.destroy = (void (*)(void *)) free_ddog_prof_CrashInfoNewResult; + SwigClassDdog_prof_CrashInfoNewResult.trackObjects = 0; + + SwigClassDdog_prof_SigInfo.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_SigInfo", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_SigInfo, (void *) &SwigClassDdog_prof_SigInfo); + rb_define_alloc_func(SwigClassDdog_prof_SigInfo.klass, _wrap_ddog_prof_SigInfo_allocate); + rb_define_method(SwigClassDdog_prof_SigInfo.klass, "initialize", _wrap_new_ddog_prof_SigInfo, -1); + rb_define_method(SwigClassDdog_prof_SigInfo.klass, "signum=", _wrap_ddog_prof_SigInfo_signum_set, -1); + rb_define_method(SwigClassDdog_prof_SigInfo.klass, "signum", _wrap_ddog_prof_SigInfo_signum_get, -1); + rb_define_method(SwigClassDdog_prof_SigInfo.klass, "signame=", _wrap_ddog_prof_SigInfo_signame_set, -1); + rb_define_method(SwigClassDdog_prof_SigInfo.klass, "signame", _wrap_ddog_prof_SigInfo_signame_get, -1); + SwigClassDdog_prof_SigInfo.mark = 0; + SwigClassDdog_prof_SigInfo.destroy = (void (*)(void *)) free_ddog_prof_SigInfo; + SwigClassDdog_prof_SigInfo.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_OPTION_U32_SOME_U32", SWIG_From_int((int)(DDOG_PROF_OPTION_U32_SOME_U32))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_OPTION_U32_NONE_U32", SWIG_From_int((int)(DDOG_PROF_OPTION_U32_NONE_U32))); + + SwigClassDdog_prof_Option_U32.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Option_U32", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Option_U32, (void *) &SwigClassDdog_prof_Option_U32); + rb_define_alloc_func(SwigClassDdog_prof_Option_U32.klass, _wrap_ddog_prof_Option_U32_allocate); + rb_define_method(SwigClassDdog_prof_Option_U32.klass, "initialize", _wrap_new_ddog_prof_Option_U32, -1); + rb_define_method(SwigClassDdog_prof_Option_U32.klass, "tag=", _wrap_ddog_prof_Option_U32_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Option_U32.klass, "tag", _wrap_ddog_prof_Option_U32_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Option_U32.klass, "some=", _wrap_ddog_prof_Option_U32_some_set, -1); + rb_define_method(SwigClassDdog_prof_Option_U32.klass, "some", _wrap_ddog_prof_Option_U32_some_get, -1); + SwigClassDdog_prof_Option_U32.mark = 0; + SwigClassDdog_prof_Option_U32.destroy = (void (*)(void *)) free_ddog_prof_Option_U32; + SwigClassDdog_prof_Option_U32.trackObjects = 0; + + SwigClassDdog_prof_StackFrameNames.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_StackFrameNames", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_StackFrameNames, (void *) &SwigClassDdog_prof_StackFrameNames); + rb_define_alloc_func(SwigClassDdog_prof_StackFrameNames.klass, _wrap_ddog_prof_StackFrameNames_allocate); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "initialize", _wrap_new_ddog_prof_StackFrameNames, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "colno=", _wrap_ddog_prof_StackFrameNames_colno_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "colno", _wrap_ddog_prof_StackFrameNames_colno_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "filename=", _wrap_ddog_prof_StackFrameNames_filename_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "filename", _wrap_ddog_prof_StackFrameNames_filename_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "lineno=", _wrap_ddog_prof_StackFrameNames_lineno_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "lineno", _wrap_ddog_prof_StackFrameNames_lineno_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "name=", _wrap_ddog_prof_StackFrameNames_name_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrameNames.klass, "name", _wrap_ddog_prof_StackFrameNames_name_get, -1); + SwigClassDdog_prof_StackFrameNames.mark = 0; + SwigClassDdog_prof_StackFrameNames.destroy = (void (*)(void *)) free_ddog_prof_StackFrameNames; + SwigClassDdog_prof_StackFrameNames.trackObjects = 0; + + SwigClassDdog_prof_Slice_StackFrameNames.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_StackFrameNames", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_StackFrameNames, (void *) &SwigClassDdog_prof_Slice_StackFrameNames); + rb_define_alloc_func(SwigClassDdog_prof_Slice_StackFrameNames.klass, _wrap_ddog_prof_Slice_StackFrameNames_allocate); + rb_define_method(SwigClassDdog_prof_Slice_StackFrameNames.klass, "initialize", _wrap_new_ddog_prof_Slice_StackFrameNames, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrameNames.klass, "ptr=", _wrap_ddog_prof_Slice_StackFrameNames_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrameNames.klass, "ptr", _wrap_ddog_prof_Slice_StackFrameNames_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrameNames.klass, "len=", _wrap_ddog_prof_Slice_StackFrameNames_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrameNames.klass, "len", _wrap_ddog_prof_Slice_StackFrameNames_len_get, -1); + SwigClassDdog_prof_Slice_StackFrameNames.mark = 0; + SwigClassDdog_prof_Slice_StackFrameNames.destroy = (void (*)(void *)) free_ddog_prof_Slice_StackFrameNames; + SwigClassDdog_prof_Slice_StackFrameNames.trackObjects = 0; + + SwigClassDdog_Slice_U8.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Slice_U8", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Slice_U8, (void *) &SwigClassDdog_Slice_U8); + rb_define_alloc_func(SwigClassDdog_Slice_U8.klass, _wrap_ddog_Slice_U8_allocate); + rb_define_method(SwigClassDdog_Slice_U8.klass, "initialize", _wrap_new_ddog_Slice_U8, -1); + rb_define_method(SwigClassDdog_Slice_U8.klass, "ptr=", _wrap_ddog_Slice_U8_ptr_set, -1); + rb_define_method(SwigClassDdog_Slice_U8.klass, "ptr", _wrap_ddog_Slice_U8_ptr_get, -1); + rb_define_method(SwigClassDdog_Slice_U8.klass, "len=", _wrap_ddog_Slice_U8_len_set, -1); + rb_define_method(SwigClassDdog_Slice_U8.klass, "len", _wrap_ddog_Slice_U8_len_get, -1); + SwigClassDdog_Slice_U8.mark = 0; + SwigClassDdog_Slice_U8.destroy = (void (*)(void *)) free_ddog_Slice_U8; + SwigClassDdog_Slice_U8.trackObjects = 0; + + SwigClassDdog_prof_NormalizedAddress.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_NormalizedAddress", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_NormalizedAddress, (void *) &SwigClassDdog_prof_NormalizedAddress); + rb_define_alloc_func(SwigClassDdog_prof_NormalizedAddress.klass, _wrap_ddog_prof_NormalizedAddress_allocate); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "initialize", _wrap_new_ddog_prof_NormalizedAddress, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "file_offset=", _wrap_ddog_prof_NormalizedAddress_file_offset_set, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "file_offset", _wrap_ddog_prof_NormalizedAddress_file_offset_get, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "build_id=", _wrap_ddog_prof_NormalizedAddress_build_id_set, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "build_id", _wrap_ddog_prof_NormalizedAddress_build_id_get, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "path=", _wrap_ddog_prof_NormalizedAddress_path_set, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "path", _wrap_ddog_prof_NormalizedAddress_path_get, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "typ=", _wrap_ddog_prof_NormalizedAddress_typ_set, -1); + rb_define_method(SwigClassDdog_prof_NormalizedAddress.klass, "typ", _wrap_ddog_prof_NormalizedAddress_typ_get, -1); + SwigClassDdog_prof_NormalizedAddress.mark = 0; + SwigClassDdog_prof_NormalizedAddress.destroy = (void (*)(void *)) free_ddog_prof_NormalizedAddress; + SwigClassDdog_prof_NormalizedAddress.trackObjects = 0; + + SwigClassDdog_prof_StackFrame.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_StackFrame", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_StackFrame, (void *) &SwigClassDdog_prof_StackFrame); + rb_define_alloc_func(SwigClassDdog_prof_StackFrame.klass, _wrap_ddog_prof_StackFrame_allocate); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "initialize", _wrap_new_ddog_prof_StackFrame, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "build_id=", _wrap_ddog_prof_StackFrame_build_id_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "build_id", _wrap_ddog_prof_StackFrame_build_id_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "ip=", _wrap_ddog_prof_StackFrame_ip_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "ip", _wrap_ddog_prof_StackFrame_ip_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "module_base_address=", _wrap_ddog_prof_StackFrame_module_base_address_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "module_base_address", _wrap_ddog_prof_StackFrame_module_base_address_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "names=", _wrap_ddog_prof_StackFrame_names_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "names", _wrap_ddog_prof_StackFrame_names_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "normalized_ip=", _wrap_ddog_prof_StackFrame_normalized_ip_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "normalized_ip", _wrap_ddog_prof_StackFrame_normalized_ip_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "sp=", _wrap_ddog_prof_StackFrame_sp_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "sp", _wrap_ddog_prof_StackFrame_sp_get, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "symbol_address=", _wrap_ddog_prof_StackFrame_symbol_address_set, -1); + rb_define_method(SwigClassDdog_prof_StackFrame.klass, "symbol_address", _wrap_ddog_prof_StackFrame_symbol_address_get, -1); + SwigClassDdog_prof_StackFrame.mark = 0; + SwigClassDdog_prof_StackFrame.destroy = (void (*)(void *)) free_ddog_prof_StackFrame; + SwigClassDdog_prof_StackFrame.trackObjects = 0; + + SwigClassDdog_prof_Slice_StackFrame.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_StackFrame", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_StackFrame, (void *) &SwigClassDdog_prof_Slice_StackFrame); + rb_define_alloc_func(SwigClassDdog_prof_Slice_StackFrame.klass, _wrap_ddog_prof_Slice_StackFrame_allocate); + rb_define_method(SwigClassDdog_prof_Slice_StackFrame.klass, "initialize", _wrap_new_ddog_prof_Slice_StackFrame, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrame.klass, "ptr=", _wrap_ddog_prof_Slice_StackFrame_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrame.klass, "ptr", _wrap_ddog_prof_Slice_StackFrame_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrame.klass, "len=", _wrap_ddog_prof_Slice_StackFrame_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_StackFrame.klass, "len", _wrap_ddog_prof_Slice_StackFrame_len_get, -1); + SwigClassDdog_prof_Slice_StackFrame.mark = 0; + SwigClassDdog_prof_Slice_StackFrame.destroy = (void (*)(void *)) free_ddog_prof_Slice_StackFrame; + SwigClassDdog_prof_Slice_StackFrame.trackObjects = 0; + + SwigClassDdog_prof_StringWrapper.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_StringWrapper", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_StringWrapper, (void *) &SwigClassDdog_prof_StringWrapper); + rb_define_alloc_func(SwigClassDdog_prof_StringWrapper.klass, _wrap_ddog_prof_StringWrapper_allocate); + rb_define_method(SwigClassDdog_prof_StringWrapper.klass, "initialize", _wrap_new_ddog_prof_StringWrapper, -1); + rb_define_method(SwigClassDdog_prof_StringWrapper.klass, "message=", _wrap_ddog_prof_StringWrapper_message_set, -1); + rb_define_method(SwigClassDdog_prof_StringWrapper.klass, "message", _wrap_ddog_prof_StringWrapper_message_get, -1); + SwigClassDdog_prof_StringWrapper.mark = 0; + SwigClassDdog_prof_StringWrapper.destroy = (void (*)(void *)) free_ddog_prof_StringWrapper; + SwigClassDdog_prof_StringWrapper.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STRING_WRAPPER_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_STRING_WRAPPER_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_STRING_WRAPPER_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_STRING_WRAPPER_RESULT_ERR))); + + SwigClassDdog_prof_StringWrapperResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_StringWrapperResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_StringWrapperResult, (void *) &SwigClassDdog_prof_StringWrapperResult); + rb_define_alloc_func(SwigClassDdog_prof_StringWrapperResult.klass, _wrap_ddog_prof_StringWrapperResult_allocate); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "initialize", _wrap_new_ddog_prof_StringWrapperResult, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "tag=", _wrap_ddog_prof_StringWrapperResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "tag", _wrap_ddog_prof_StringWrapperResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "ok=", _wrap_ddog_prof_StringWrapperResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "ok", _wrap_ddog_prof_StringWrapperResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "err=", _wrap_ddog_prof_StringWrapperResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_StringWrapperResult.klass, "err", _wrap_ddog_prof_StringWrapperResult_err_get, -1); + SwigClassDdog_prof_StringWrapperResult.mark = 0; + SwigClassDdog_prof_StringWrapperResult.destroy = (void (*)(void *)) free_ddog_prof_StringWrapperResult; + SwigClassDdog_prof_StringWrapperResult.trackObjects = 0; + + SwigClassDdog_prof_Exporter_File.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Exporter_File", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Exporter_File, (void *) &SwigClassDdog_prof_Exporter_File); + rb_define_alloc_func(SwigClassDdog_prof_Exporter_File.klass, _wrap_ddog_prof_Exporter_File_allocate); + rb_define_method(SwigClassDdog_prof_Exporter_File.klass, "initialize", _wrap_new_ddog_prof_Exporter_File, -1); + rb_define_method(SwigClassDdog_prof_Exporter_File.klass, "name=", _wrap_ddog_prof_Exporter_File_name_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_File.klass, "name", _wrap_ddog_prof_Exporter_File_name_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_File.klass, "file=", _wrap_ddog_prof_Exporter_File_file_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_File.klass, "file", _wrap_ddog_prof_Exporter_File_file_get, -1); + SwigClassDdog_prof_Exporter_File.mark = 0; + SwigClassDdog_prof_Exporter_File.destroy = (void (*)(void *)) free_ddog_prof_Exporter_File; + SwigClassDdog_prof_Exporter_File.trackObjects = 0; + + SwigClassDdog_prof_Exporter_Slice_File.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Exporter_Slice_File", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Exporter_Slice_File, (void *) &SwigClassDdog_prof_Exporter_Slice_File); + rb_define_alloc_func(SwigClassDdog_prof_Exporter_Slice_File.klass, _wrap_ddog_prof_Exporter_Slice_File_allocate); + rb_define_method(SwigClassDdog_prof_Exporter_Slice_File.klass, "initialize", _wrap_new_ddog_prof_Exporter_Slice_File, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Slice_File.klass, "ptr=", _wrap_ddog_prof_Exporter_Slice_File_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Slice_File.klass, "ptr", _wrap_ddog_prof_Exporter_Slice_File_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Slice_File.klass, "len=", _wrap_ddog_prof_Exporter_Slice_File_len_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Slice_File.klass, "len", _wrap_ddog_prof_Exporter_Slice_File_len_get, -1); + SwigClassDdog_prof_Exporter_Slice_File.mark = 0; + SwigClassDdog_prof_Exporter_Slice_File.destroy = (void (*)(void *)) free_ddog_prof_Exporter_Slice_File; + SwigClassDdog_prof_Exporter_Slice_File.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_NEW_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_EXPORTER_NEW_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_NEW_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_EXPORTER_NEW_RESULT_ERR))); + + SwigClassDdog_prof_Exporter_NewResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Exporter_NewResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Exporter_NewResult, (void *) &SwigClassDdog_prof_Exporter_NewResult); + rb_define_alloc_func(SwigClassDdog_prof_Exporter_NewResult.klass, _wrap_ddog_prof_Exporter_NewResult_allocate); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "initialize", _wrap_new_ddog_prof_Exporter_NewResult, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "tag=", _wrap_ddog_prof_Exporter_NewResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "tag", _wrap_ddog_prof_Exporter_NewResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "ok=", _wrap_ddog_prof_Exporter_NewResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "ok", _wrap_ddog_prof_Exporter_NewResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "err=", _wrap_ddog_prof_Exporter_NewResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_NewResult.klass, "err", _wrap_ddog_prof_Exporter_NewResult_err_get, -1); + SwigClassDdog_prof_Exporter_NewResult.mark = 0; + SwigClassDdog_prof_Exporter_NewResult.destroy = (void (*)(void *)) free_ddog_prof_Exporter_NewResult; + SwigClassDdog_prof_Exporter_NewResult.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_REQUEST_BUILD_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_EXPORTER_REQUEST_BUILD_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_REQUEST_BUILD_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_EXPORTER_REQUEST_BUILD_RESULT_ERR))); + + SwigClassDdog_prof_Exporter_Request_BuildResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Exporter_Request_BuildResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Exporter_Request_BuildResult, (void *) &SwigClassDdog_prof_Exporter_Request_BuildResult); + rb_define_alloc_func(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, _wrap_ddog_prof_Exporter_Request_BuildResult_allocate); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "initialize", _wrap_new_ddog_prof_Exporter_Request_BuildResult, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "tag=", _wrap_ddog_prof_Exporter_Request_BuildResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "tag", _wrap_ddog_prof_Exporter_Request_BuildResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "ok=", _wrap_ddog_prof_Exporter_Request_BuildResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "ok", _wrap_ddog_prof_Exporter_Request_BuildResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "err=", _wrap_ddog_prof_Exporter_Request_BuildResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_Request_BuildResult.klass, "err", _wrap_ddog_prof_Exporter_Request_BuildResult_err_get, -1); + SwigClassDdog_prof_Exporter_Request_BuildResult.mark = 0; + SwigClassDdog_prof_Exporter_Request_BuildResult.destroy = (void (*)(void *)) free_ddog_prof_Exporter_Request_BuildResult; + SwigClassDdog_prof_Exporter_Request_BuildResult.trackObjects = 0; + + SwigClassDdog_Timespec.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Timespec", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Timespec, (void *) &SwigClassDdog_Timespec); + rb_define_alloc_func(SwigClassDdog_Timespec.klass, _wrap_ddog_Timespec_allocate); + rb_define_method(SwigClassDdog_Timespec.klass, "initialize", _wrap_new_ddog_Timespec, -1); + rb_define_method(SwigClassDdog_Timespec.klass, "seconds=", _wrap_ddog_Timespec_seconds_set, -1); + rb_define_method(SwigClassDdog_Timespec.klass, "seconds", _wrap_ddog_Timespec_seconds_get, -1); + rb_define_method(SwigClassDdog_Timespec.klass, "nanoseconds=", _wrap_ddog_Timespec_nanoseconds_set, -1); + rb_define_method(SwigClassDdog_Timespec.klass, "nanoseconds", _wrap_ddog_Timespec_nanoseconds_get, -1); + SwigClassDdog_Timespec.mark = 0; + SwigClassDdog_Timespec.destroy = (void (*)(void *)) free_ddog_Timespec; + SwigClassDdog_Timespec.trackObjects = 0; + + SwigClassDdog_HttpStatus.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_HttpStatus", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_HttpStatus, (void *) &SwigClassDdog_HttpStatus); + rb_define_alloc_func(SwigClassDdog_HttpStatus.klass, _wrap_ddog_HttpStatus_allocate); + rb_define_method(SwigClassDdog_HttpStatus.klass, "initialize", _wrap_new_ddog_HttpStatus, -1); + rb_define_method(SwigClassDdog_HttpStatus.klass, "code=", _wrap_ddog_HttpStatus_code_set, -1); + rb_define_method(SwigClassDdog_HttpStatus.klass, "code", _wrap_ddog_HttpStatus_code_get, -1); + SwigClassDdog_HttpStatus.mark = 0; + SwigClassDdog_HttpStatus.destroy = (void (*)(void *)) free_ddog_HttpStatus; + SwigClassDdog_HttpStatus.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_SEND_RESULT_HTTP_RESPONSE", SWIG_From_int((int)(DDOG_PROF_EXPORTER_SEND_RESULT_HTTP_RESPONSE))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_EXPORTER_SEND_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_EXPORTER_SEND_RESULT_ERR))); + + SwigClassDdog_prof_Exporter_SendResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Exporter_SendResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Exporter_SendResult, (void *) &SwigClassDdog_prof_Exporter_SendResult); + rb_define_alloc_func(SwigClassDdog_prof_Exporter_SendResult.klass, _wrap_ddog_prof_Exporter_SendResult_allocate); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "initialize", _wrap_new_ddog_prof_Exporter_SendResult, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "tag=", _wrap_ddog_prof_Exporter_SendResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "tag", _wrap_ddog_prof_Exporter_SendResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "http_response=", _wrap_ddog_prof_Exporter_SendResult_http_response_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "http_response", _wrap_ddog_prof_Exporter_SendResult_http_response_get, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "err=", _wrap_ddog_prof_Exporter_SendResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_Exporter_SendResult.klass, "err", _wrap_ddog_prof_Exporter_SendResult_err_get, -1); + SwigClassDdog_prof_Exporter_SendResult.mark = 0; + SwigClassDdog_prof_Exporter_SendResult.destroy = (void (*)(void *)) free_ddog_prof_Exporter_SendResult; + SwigClassDdog_prof_Exporter_SendResult.trackObjects = 0; + + SwigClassDdog_prof_Profile.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Profile", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Profile, (void *) &SwigClassDdog_prof_Profile); + rb_define_alloc_func(SwigClassDdog_prof_Profile.klass, _wrap_ddog_prof_Profile_allocate); + rb_define_method(SwigClassDdog_prof_Profile.klass, "initialize", _wrap_new_ddog_prof_Profile, -1); + rb_define_method(SwigClassDdog_prof_Profile.klass, "inner=", _wrap_ddog_prof_Profile_inner_set, -1); + rb_define_method(SwigClassDdog_prof_Profile.klass, "inner", _wrap_ddog_prof_Profile_inner_get, -1); + SwigClassDdog_prof_Profile.mark = 0; + SwigClassDdog_prof_Profile.destroy = (void (*)(void *)) free_ddog_prof_Profile; + SwigClassDdog_prof_Profile.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_NEW_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_PROFILE_NEW_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_NEW_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_PROFILE_NEW_RESULT_ERR))); + + SwigClassDdog_prof_Profile_NewResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Profile_NewResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Profile_NewResult, (void *) &SwigClassDdog_prof_Profile_NewResult); + rb_define_alloc_func(SwigClassDdog_prof_Profile_NewResult.klass, _wrap_ddog_prof_Profile_NewResult_allocate); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "initialize", _wrap_new_ddog_prof_Profile_NewResult, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "tag=", _wrap_ddog_prof_Profile_NewResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "tag", _wrap_ddog_prof_Profile_NewResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "ok=", _wrap_ddog_prof_Profile_NewResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "ok", _wrap_ddog_prof_Profile_NewResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "err=", _wrap_ddog_prof_Profile_NewResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_NewResult.klass, "err", _wrap_ddog_prof_Profile_NewResult_err_get, -1); + SwigClassDdog_prof_Profile_NewResult.mark = 0; + SwigClassDdog_prof_Profile_NewResult.destroy = (void (*)(void *)) free_ddog_prof_Profile_NewResult; + SwigClassDdog_prof_Profile_NewResult.trackObjects = 0; + + SwigClassDdog_prof_ValueType.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_ValueType", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_ValueType, (void *) &SwigClassDdog_prof_ValueType); + rb_define_alloc_func(SwigClassDdog_prof_ValueType.klass, _wrap_ddog_prof_ValueType_allocate); + rb_define_method(SwigClassDdog_prof_ValueType.klass, "initialize", _wrap_new_ddog_prof_ValueType, -1); + rb_define_method(SwigClassDdog_prof_ValueType.klass, "type_=", _wrap_ddog_prof_ValueType_type__set, -1); + rb_define_method(SwigClassDdog_prof_ValueType.klass, "type_", _wrap_ddog_prof_ValueType_type__get, -1); + rb_define_method(SwigClassDdog_prof_ValueType.klass, "unit=", _wrap_ddog_prof_ValueType_unit_set, -1); + rb_define_method(SwigClassDdog_prof_ValueType.klass, "unit", _wrap_ddog_prof_ValueType_unit_get, -1); + SwigClassDdog_prof_ValueType.mark = 0; + SwigClassDdog_prof_ValueType.destroy = (void (*)(void *)) free_ddog_prof_ValueType; + SwigClassDdog_prof_ValueType.trackObjects = 0; + + SwigClassDdog_prof_Slice_ValueType.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_ValueType", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_ValueType, (void *) &SwigClassDdog_prof_Slice_ValueType); + rb_define_alloc_func(SwigClassDdog_prof_Slice_ValueType.klass, _wrap_ddog_prof_Slice_ValueType_allocate); + rb_define_method(SwigClassDdog_prof_Slice_ValueType.klass, "initialize", _wrap_new_ddog_prof_Slice_ValueType, -1); + rb_define_method(SwigClassDdog_prof_Slice_ValueType.klass, "ptr=", _wrap_ddog_prof_Slice_ValueType_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_ValueType.klass, "ptr", _wrap_ddog_prof_Slice_ValueType_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_ValueType.klass, "len=", _wrap_ddog_prof_Slice_ValueType_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_ValueType.klass, "len", _wrap_ddog_prof_Slice_ValueType_len_get, -1); + SwigClassDdog_prof_Slice_ValueType.mark = 0; + SwigClassDdog_prof_Slice_ValueType.destroy = (void (*)(void *)) free_ddog_prof_Slice_ValueType; + SwigClassDdog_prof_Slice_ValueType.trackObjects = 0; + + SwigClassDdog_prof_Period.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Period", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Period, (void *) &SwigClassDdog_prof_Period); + rb_define_alloc_func(SwigClassDdog_prof_Period.klass, _wrap_ddog_prof_Period_allocate); + rb_define_method(SwigClassDdog_prof_Period.klass, "initialize", _wrap_new_ddog_prof_Period, -1); + rb_define_method(SwigClassDdog_prof_Period.klass, "type_=", _wrap_ddog_prof_Period_type__set, -1); + rb_define_method(SwigClassDdog_prof_Period.klass, "type_", _wrap_ddog_prof_Period_type__get, -1); + rb_define_method(SwigClassDdog_prof_Period.klass, "value=", _wrap_ddog_prof_Period_value_set, -1); + rb_define_method(SwigClassDdog_prof_Period.klass, "value", _wrap_ddog_prof_Period_value_get, -1); + SwigClassDdog_prof_Period.mark = 0; + SwigClassDdog_prof_Period.destroy = (void (*)(void *)) free_ddog_prof_Period; + SwigClassDdog_prof_Period.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_PROFILE_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_PROFILE_RESULT_ERR))); + + SwigClassDdog_prof_Profile_Result.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Profile_Result", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Profile_Result, (void *) &SwigClassDdog_prof_Profile_Result); + rb_define_alloc_func(SwigClassDdog_prof_Profile_Result.klass, _wrap_ddog_prof_Profile_Result_allocate); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "initialize", _wrap_new_ddog_prof_Profile_Result, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "tag=", _wrap_ddog_prof_Profile_Result_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "tag", _wrap_ddog_prof_Profile_Result_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "ok=", _wrap_ddog_prof_Profile_Result_ok_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "ok", _wrap_ddog_prof_Profile_Result_ok_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "err=", _wrap_ddog_prof_Profile_Result_err_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_Result.klass, "err", _wrap_ddog_prof_Profile_Result_err_get, -1); + SwigClassDdog_prof_Profile_Result.mark = 0; + SwigClassDdog_prof_Profile_Result.destroy = (void (*)(void *)) free_ddog_prof_Profile_Result; + SwigClassDdog_prof_Profile_Result.trackObjects = 0; + + SwigClassDdog_prof_Mapping.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Mapping", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Mapping, (void *) &SwigClassDdog_prof_Mapping); + rb_define_alloc_func(SwigClassDdog_prof_Mapping.klass, _wrap_ddog_prof_Mapping_allocate); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "initialize", _wrap_new_ddog_prof_Mapping, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "memory_start=", _wrap_ddog_prof_Mapping_memory_start_set, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "memory_start", _wrap_ddog_prof_Mapping_memory_start_get, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "memory_limit=", _wrap_ddog_prof_Mapping_memory_limit_set, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "memory_limit", _wrap_ddog_prof_Mapping_memory_limit_get, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "file_offset=", _wrap_ddog_prof_Mapping_file_offset_set, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "file_offset", _wrap_ddog_prof_Mapping_file_offset_get, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "filename=", _wrap_ddog_prof_Mapping_filename_set, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "filename", _wrap_ddog_prof_Mapping_filename_get, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "build_id=", _wrap_ddog_prof_Mapping_build_id_set, -1); + rb_define_method(SwigClassDdog_prof_Mapping.klass, "build_id", _wrap_ddog_prof_Mapping_build_id_get, -1); + SwigClassDdog_prof_Mapping.mark = 0; + SwigClassDdog_prof_Mapping.destroy = (void (*)(void *)) free_ddog_prof_Mapping; + SwigClassDdog_prof_Mapping.trackObjects = 0; + + SwigClassDdog_prof_Function.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Function", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Function, (void *) &SwigClassDdog_prof_Function); + rb_define_alloc_func(SwigClassDdog_prof_Function.klass, _wrap_ddog_prof_Function_allocate); + rb_define_method(SwigClassDdog_prof_Function.klass, "initialize", _wrap_new_ddog_prof_Function, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "name=", _wrap_ddog_prof_Function_name_set, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "name", _wrap_ddog_prof_Function_name_get, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "system_name=", _wrap_ddog_prof_Function_system_name_set, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "system_name", _wrap_ddog_prof_Function_system_name_get, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "filename=", _wrap_ddog_prof_Function_filename_set, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "filename", _wrap_ddog_prof_Function_filename_get, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "start_line=", _wrap_ddog_prof_Function_start_line_set, -1); + rb_define_method(SwigClassDdog_prof_Function.klass, "start_line", _wrap_ddog_prof_Function_start_line_get, -1); + SwigClassDdog_prof_Function.mark = 0; + SwigClassDdog_prof_Function.destroy = (void (*)(void *)) free_ddog_prof_Function; + SwigClassDdog_prof_Function.trackObjects = 0; + + SwigClassDdog_prof_Location.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Location", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Location, (void *) &SwigClassDdog_prof_Location); + rb_define_alloc_func(SwigClassDdog_prof_Location.klass, _wrap_ddog_prof_Location_allocate); + rb_define_method(SwigClassDdog_prof_Location.klass, "initialize", _wrap_new_ddog_prof_Location, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "mapping=", _wrap_ddog_prof_Location_mapping_set, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "mapping", _wrap_ddog_prof_Location_mapping_get, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "function=", _wrap_ddog_prof_Location_function_set, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "function", _wrap_ddog_prof_Location_function_get, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "address=", _wrap_ddog_prof_Location_address_set, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "address", _wrap_ddog_prof_Location_address_get, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "line=", _wrap_ddog_prof_Location_line_set, -1); + rb_define_method(SwigClassDdog_prof_Location.klass, "line", _wrap_ddog_prof_Location_line_get, -1); + SwigClassDdog_prof_Location.mark = 0; + SwigClassDdog_prof_Location.destroy = (void (*)(void *)) free_ddog_prof_Location; + SwigClassDdog_prof_Location.trackObjects = 0; + + SwigClassDdog_prof_Slice_Location.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_Location", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_Location, (void *) &SwigClassDdog_prof_Slice_Location); + rb_define_alloc_func(SwigClassDdog_prof_Slice_Location.klass, _wrap_ddog_prof_Slice_Location_allocate); + rb_define_method(SwigClassDdog_prof_Slice_Location.klass, "initialize", _wrap_new_ddog_prof_Slice_Location, -1); + rb_define_method(SwigClassDdog_prof_Slice_Location.klass, "ptr=", _wrap_ddog_prof_Slice_Location_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Location.klass, "ptr", _wrap_ddog_prof_Slice_Location_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_Location.klass, "len=", _wrap_ddog_prof_Slice_Location_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Location.klass, "len", _wrap_ddog_prof_Slice_Location_len_get, -1); + SwigClassDdog_prof_Slice_Location.mark = 0; + SwigClassDdog_prof_Slice_Location.destroy = (void (*)(void *)) free_ddog_prof_Slice_Location; + SwigClassDdog_prof_Slice_Location.trackObjects = 0; + + SwigClassDdog_Slice_I64.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Slice_I64", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Slice_I64, (void *) &SwigClassDdog_Slice_I64); + rb_define_alloc_func(SwigClassDdog_Slice_I64.klass, _wrap_ddog_Slice_I64_allocate); + rb_define_method(SwigClassDdog_Slice_I64.klass, "initialize", _wrap_new_ddog_Slice_I64, -1); + rb_define_method(SwigClassDdog_Slice_I64.klass, "ptr=", _wrap_ddog_Slice_I64_ptr_set, -1); + rb_define_method(SwigClassDdog_Slice_I64.klass, "ptr", _wrap_ddog_Slice_I64_ptr_get, -1); + rb_define_method(SwigClassDdog_Slice_I64.klass, "len=", _wrap_ddog_Slice_I64_len_set, -1); + rb_define_method(SwigClassDdog_Slice_I64.klass, "len", _wrap_ddog_Slice_I64_len_get, -1); + SwigClassDdog_Slice_I64.mark = 0; + SwigClassDdog_Slice_I64.destroy = (void (*)(void *)) free_ddog_Slice_I64; + SwigClassDdog_Slice_I64.trackObjects = 0; + + SwigClassDdog_prof_Label.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Label", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Label, (void *) &SwigClassDdog_prof_Label); + rb_define_alloc_func(SwigClassDdog_prof_Label.klass, _wrap_ddog_prof_Label_allocate); + rb_define_method(SwigClassDdog_prof_Label.klass, "initialize", _wrap_new_ddog_prof_Label, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "key=", _wrap_ddog_prof_Label_key_set, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "key", _wrap_ddog_prof_Label_key_get, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "str=", _wrap_ddog_prof_Label_str_set, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "str", _wrap_ddog_prof_Label_str_get, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "num=", _wrap_ddog_prof_Label_num_set, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "num", _wrap_ddog_prof_Label_num_get, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "num_unit=", _wrap_ddog_prof_Label_num_unit_set, -1); + rb_define_method(SwigClassDdog_prof_Label.klass, "num_unit", _wrap_ddog_prof_Label_num_unit_get, -1); + SwigClassDdog_prof_Label.mark = 0; + SwigClassDdog_prof_Label.destroy = (void (*)(void *)) free_ddog_prof_Label; + SwigClassDdog_prof_Label.trackObjects = 0; + + SwigClassDdog_prof_Slice_Label.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_Label", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_Label, (void *) &SwigClassDdog_prof_Slice_Label); + rb_define_alloc_func(SwigClassDdog_prof_Slice_Label.klass, _wrap_ddog_prof_Slice_Label_allocate); + rb_define_method(SwigClassDdog_prof_Slice_Label.klass, "initialize", _wrap_new_ddog_prof_Slice_Label, -1); + rb_define_method(SwigClassDdog_prof_Slice_Label.klass, "ptr=", _wrap_ddog_prof_Slice_Label_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Label.klass, "ptr", _wrap_ddog_prof_Slice_Label_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_Label.klass, "len=", _wrap_ddog_prof_Slice_Label_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Label.klass, "len", _wrap_ddog_prof_Slice_Label_len_get, -1); + SwigClassDdog_prof_Slice_Label.mark = 0; + SwigClassDdog_prof_Slice_Label.destroy = (void (*)(void *)) free_ddog_prof_Slice_Label; + SwigClassDdog_prof_Slice_Label.trackObjects = 0; + + SwigClassDdog_prof_Sample.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Sample", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Sample, (void *) &SwigClassDdog_prof_Sample); + rb_define_alloc_func(SwigClassDdog_prof_Sample.klass, _wrap_ddog_prof_Sample_allocate); + rb_define_method(SwigClassDdog_prof_Sample.klass, "initialize", _wrap_new_ddog_prof_Sample, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "locations=", _wrap_ddog_prof_Sample_locations_set, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "locations", _wrap_ddog_prof_Sample_locations_get, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "values=", _wrap_ddog_prof_Sample_values_set, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "values", _wrap_ddog_prof_Sample_values_get, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "labels=", _wrap_ddog_prof_Sample_labels_set, -1); + rb_define_method(SwigClassDdog_prof_Sample.klass, "labels", _wrap_ddog_prof_Sample_labels_get, -1); + SwigClassDdog_prof_Sample.mark = 0; + SwigClassDdog_prof_Sample.destroy = (void (*)(void *)) free_ddog_prof_Sample; + SwigClassDdog_prof_Sample.trackObjects = 0; + + SwigClassDdog_prof_Slice_Usize.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Slice_Usize", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Slice_Usize, (void *) &SwigClassDdog_prof_Slice_Usize); + rb_define_alloc_func(SwigClassDdog_prof_Slice_Usize.klass, _wrap_ddog_prof_Slice_Usize_allocate); + rb_define_method(SwigClassDdog_prof_Slice_Usize.klass, "initialize", _wrap_new_ddog_prof_Slice_Usize, -1); + rb_define_method(SwigClassDdog_prof_Slice_Usize.klass, "ptr=", _wrap_ddog_prof_Slice_Usize_ptr_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Usize.klass, "ptr", _wrap_ddog_prof_Slice_Usize_ptr_get, -1); + rb_define_method(SwigClassDdog_prof_Slice_Usize.klass, "len=", _wrap_ddog_prof_Slice_Usize_len_set, -1); + rb_define_method(SwigClassDdog_prof_Slice_Usize.klass, "len", _wrap_ddog_prof_Slice_Usize_len_get, -1); + SwigClassDdog_prof_Slice_Usize.mark = 0; + SwigClassDdog_prof_Slice_Usize.destroy = (void (*)(void *)) free_ddog_prof_Slice_Usize; + SwigClassDdog_prof_Slice_Usize.trackObjects = 0; + + SwigClassDdog_prof_EncodedProfile.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_EncodedProfile", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_EncodedProfile, (void *) &SwigClassDdog_prof_EncodedProfile); + rb_define_alloc_func(SwigClassDdog_prof_EncodedProfile.klass, _wrap_ddog_prof_EncodedProfile_allocate); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "initialize", _wrap_new_ddog_prof_EncodedProfile, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "start=", _wrap_ddog_prof_EncodedProfile_start_set, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "start", _wrap_ddog_prof_EncodedProfile_start_get, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "end=", _wrap_ddog_prof_EncodedProfile_end_set, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "end", _wrap_ddog_prof_EncodedProfile_end_get, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "buffer=", _wrap_ddog_prof_EncodedProfile_buffer_set, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "buffer", _wrap_ddog_prof_EncodedProfile_buffer_get, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "endpoints_stats=", _wrap_ddog_prof_EncodedProfile_endpoints_stats_set, -1); + rb_define_method(SwigClassDdog_prof_EncodedProfile.klass, "endpoints_stats", _wrap_ddog_prof_EncodedProfile_endpoints_stats_get, -1); + SwigClassDdog_prof_EncodedProfile.mark = 0; + SwigClassDdog_prof_EncodedProfile.destroy = (void (*)(void *)) free_ddog_prof_EncodedProfile; + SwigClassDdog_prof_EncodedProfile.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_SERIALIZE_RESULT_OK", SWIG_From_int((int)(DDOG_PROF_PROFILE_SERIALIZE_RESULT_OK))); + rb_define_const(mLibdatadog_ruby, "DDOG_PROF_PROFILE_SERIALIZE_RESULT_ERR", SWIG_From_int((int)(DDOG_PROF_PROFILE_SERIALIZE_RESULT_ERR))); + + SwigClassDdog_prof_Profile_SerializeResult.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_prof_Profile_SerializeResult", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_prof_Profile_SerializeResult, (void *) &SwigClassDdog_prof_Profile_SerializeResult); + rb_define_alloc_func(SwigClassDdog_prof_Profile_SerializeResult.klass, _wrap_ddog_prof_Profile_SerializeResult_allocate); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "initialize", _wrap_new_ddog_prof_Profile_SerializeResult, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "tag=", _wrap_ddog_prof_Profile_SerializeResult_tag_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "tag", _wrap_ddog_prof_Profile_SerializeResult_tag_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "ok=", _wrap_ddog_prof_Profile_SerializeResult_ok_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "ok", _wrap_ddog_prof_Profile_SerializeResult_ok_get, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "err=", _wrap_ddog_prof_Profile_SerializeResult_err_set, -1); + rb_define_method(SwigClassDdog_prof_Profile_SerializeResult.klass, "err", _wrap_ddog_prof_Profile_SerializeResult_err_get, -1); + SwigClassDdog_prof_Profile_SerializeResult.mark = 0; + SwigClassDdog_prof_Profile_SerializeResult.destroy = (void (*)(void *)) free_ddog_prof_Profile_SerializeResult; + SwigClassDdog_prof_Profile_SerializeResult.trackObjects = 0; + rb_define_const(mLibdatadog_ruby, "DDOG_CONFIGURATION_ORIGIN_ENV_VAR", SWIG_From_int((int)(DDOG_CONFIGURATION_ORIGIN_ENV_VAR))); + rb_define_const(mLibdatadog_ruby, "DDOG_CONFIGURATION_ORIGIN_CODE", SWIG_From_int((int)(DDOG_CONFIGURATION_ORIGIN_CODE))); + rb_define_const(mLibdatadog_ruby, "DDOG_CONFIGURATION_ORIGIN_DD_CONFIG", SWIG_From_int((int)(DDOG_CONFIGURATION_ORIGIN_DD_CONFIG))); + rb_define_const(mLibdatadog_ruby, "DDOG_CONFIGURATION_ORIGIN_REMOTE_CONFIG", SWIG_From_int((int)(DDOG_CONFIGURATION_ORIGIN_REMOTE_CONFIG))); + rb_define_const(mLibdatadog_ruby, "DDOG_CONFIGURATION_ORIGIN_DEFAULT", SWIG_From_int((int)(DDOG_CONFIGURATION_ORIGIN_DEFAULT))); + rb_define_const(mLibdatadog_ruby, "DDOG_LOG_LEVEL_ERROR", SWIG_From_int((int)(DDOG_LOG_LEVEL_ERROR))); + rb_define_const(mLibdatadog_ruby, "DDOG_LOG_LEVEL_WARN", SWIG_From_int((int)(DDOG_LOG_LEVEL_WARN))); + rb_define_const(mLibdatadog_ruby, "DDOG_LOG_LEVEL_DEBUG", SWIG_From_int((int)(DDOG_LOG_LEVEL_DEBUG))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_TRACERS", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_TRACERS))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_PROFILERS", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_PROFILERS))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_RUM", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_RUM))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_APPSEC", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_APPSEC))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_IDE_PLUGINS", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_IDE_PLUGINS))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_LIVE_DEBUGGER", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_LIVE_DEBUGGER))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_IAST", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_IAST))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_GENERAL", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_GENERAL))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_TELEMETRY", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_TELEMETRY))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_APM", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_APM))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_NAMESPACE_SIDECAR", SWIG_From_int((int)(DDOG_METRIC_NAMESPACE_SIDECAR))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_TYPE_GAUGE", SWIG_From_int((int)(DDOG_METRIC_TYPE_GAUGE))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_TYPE_COUNT", SWIG_From_int((int)(DDOG_METRIC_TYPE_COUNT))); + rb_define_const(mLibdatadog_ruby, "DDOG_METRIC_TYPE_DISTRIBUTION", SWIG_From_int((int)(DDOG_METRIC_TYPE_DISTRIBUTION))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_BOOL_PROPERTY_CONFIG_TELEMETRY_DEBUG_LOGGING_ENABLED", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_BOOL_PROPERTY_CONFIG_TELEMETRY_DEBUG_LOGGING_ENABLED))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_ENDPOINT_PROPERTY_CONFIG_ENDPOINT", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_ENDPOINT_PROPERTY_CONFIG_ENDPOINT))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_SERVICE_VERSION", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_SERVICE_VERSION))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_ENV", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_ENV))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_NAME", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_NAME))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_VERSION", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_VERSION))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_PATCHES", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_APPLICATION_RUNTIME_PATCHES))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_CONTAINER_ID", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_CONTAINER_ID))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_OS", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_OS))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_NAME", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_NAME))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_RELEASE", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_RELEASE))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_VERSION", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_HOST_KERNEL_VERSION))); + rb_define_const(mLibdatadog_ruby, "DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_RUNTIME_ID", SWIG_From_int((int)(DDOG_TELEMETRY_WORKER_BUILDER_STR_PROPERTY_RUNTIME_ID))); + rb_define_const(mLibdatadog_ruby, "DDOG_OPTION_BOOL_SOME_BOOL", SWIG_From_int((int)(DDOG_OPTION_BOOL_SOME_BOOL))); + rb_define_const(mLibdatadog_ruby, "DDOG_OPTION_BOOL_NONE_BOOL", SWIG_From_int((int)(DDOG_OPTION_BOOL_NONE_BOOL))); + + SwigClassDdog_Option_Bool.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_Option_Bool", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_Option_Bool, (void *) &SwigClassDdog_Option_Bool); + rb_define_alloc_func(SwigClassDdog_Option_Bool.klass, _wrap_ddog_Option_Bool_allocate); + rb_define_method(SwigClassDdog_Option_Bool.klass, "initialize", _wrap_new_ddog_Option_Bool, -1); + rb_define_method(SwigClassDdog_Option_Bool.klass, "tag=", _wrap_ddog_Option_Bool_tag_set, -1); + rb_define_method(SwigClassDdog_Option_Bool.klass, "tag", _wrap_ddog_Option_Bool_tag_get, -1); + rb_define_method(SwigClassDdog_Option_Bool.klass, "some=", _wrap_ddog_Option_Bool_some_set, -1); + rb_define_method(SwigClassDdog_Option_Bool.klass, "some", _wrap_ddog_Option_Bool_some_get, -1); + SwigClassDdog_Option_Bool.mark = 0; + SwigClassDdog_Option_Bool.destroy = (void (*)(void *)) free_ddog_Option_Bool; + SwigClassDdog_Option_Bool.trackObjects = 0; + + SwigClassDdog_ContextKey.klass = rb_define_class_under(mLibdatadog_ruby, "Ddog_ContextKey", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_ddog_ContextKey, (void *) &SwigClassDdog_ContextKey); + rb_define_alloc_func(SwigClassDdog_ContextKey.klass, _wrap_ddog_ContextKey_allocate); + rb_define_method(SwigClassDdog_ContextKey.klass, "initialize", _wrap_new_ddog_ContextKey, -1); + rb_define_method(SwigClassDdog_ContextKey.klass, "_0=", _wrap_ddog_ContextKey__0_set, -1); + rb_define_method(SwigClassDdog_ContextKey.klass, "_0", _wrap_ddog_ContextKey__0_get, -1); + rb_define_method(SwigClassDdog_ContextKey.klass, "_1=", _wrap_ddog_ContextKey__1_set, -1); + rb_define_method(SwigClassDdog_ContextKey.klass, "_1", _wrap_ddog_ContextKey__1_get, -1); + SwigClassDdog_ContextKey.mark = 0; + SwigClassDdog_ContextKey.destroy = (void (*)(void *)) free_ddog_ContextKey; + SwigClassDdog_ContextKey.trackObjects = 0; + rb_define_module_function(mLibdatadog_ruby, "ddog_Error_drop", _wrap_ddog_Error_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Error_message", _wrap_ddog_Error_message, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_MaybeError_drop", _wrap_ddog_MaybeError_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_endpoint_from_url", _wrap_ddog_endpoint_from_url, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_endpoint_from_api_key", _wrap_ddog_endpoint_from_api_key, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_endpoint_from_api_key_and_site", _wrap_ddog_endpoint_from_api_key_and_site, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_endpoint_drop", _wrap_ddog_endpoint_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_StringWrapper_drop", _wrap_ddog_StringWrapper_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_StringWrapper_message", _wrap_ddog_StringWrapper_message, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Vec_Tag_new", _wrap_ddog_Vec_Tag_new, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Vec_Tag_drop", _wrap_ddog_Vec_Tag_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Vec_Tag_push", _wrap_ddog_Vec_Tag_push, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Vec_Tag_parse", _wrap_ddog_Vec_Tag_parse, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_shutdown", _wrap_ddog_prof_Crashtracker_shutdown, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_update_on_fork", _wrap_ddog_prof_Crashtracker_update_on_fork, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_receiver_entry_point_stdin", _wrap_ddog_prof_Crashtracker_receiver_entry_point_stdin, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_receiver_entry_point_unix_socket", _wrap_ddog_prof_Crashtracker_receiver_entry_point_unix_socket, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_init_with_receiver", _wrap_ddog_prof_Crashtracker_init_with_receiver, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_reset_counters", _wrap_ddog_prof_Crashtracker_reset_counters, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_begin_profiling_op", _wrap_ddog_prof_Crashtracker_begin_profiling_op, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Crashtracker_end_profiling_op", _wrap_ddog_prof_Crashtracker_end_profiling_op, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_new", _wrap_ddog_crashinfo_new, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_drop", _wrap_ddog_crashinfo_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_normalize_ips", _wrap_ddog_crashinfo_normalize_ips, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_add_counter", _wrap_ddog_crashinfo_add_counter, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_add_file", _wrap_ddog_crashinfo_add_file, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_add_tag", _wrap_ddog_crashinfo_add_tag, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_set_metadata", _wrap_ddog_crashinfo_set_metadata, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_set_siginfo", _wrap_ddog_crashinfo_set_siginfo, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_set_stacktrace", _wrap_ddog_crashinfo_set_stacktrace, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_set_timestamp", _wrap_ddog_crashinfo_set_timestamp, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_set_timestamp_to_now", _wrap_ddog_crashinfo_set_timestamp_to_now, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_crashinfo_upload_to_endpoint", _wrap_ddog_crashinfo_upload_to_endpoint, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_demangle", _wrap_ddog_demangle, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_Slice_File_empty", _wrap_ddog_prof_Exporter_Slice_File_empty, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Endpoint_agent", _wrap_ddog_prof_Endpoint_agent, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Endpoint_agentless", _wrap_ddog_prof_Endpoint_agentless, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Endpoint_file", _wrap_ddog_Endpoint_file, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_new", _wrap_ddog_prof_Exporter_new, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_drop", _wrap_ddog_prof_Exporter_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_Request_build", _wrap_ddog_prof_Exporter_Request_build, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_Request_drop", _wrap_ddog_prof_Exporter_Request_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Exporter_send", _wrap_ddog_prof_Exporter_send, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_CancellationToken_new", _wrap_ddog_CancellationToken_new, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_CancellationToken_clone", _wrap_ddog_CancellationToken_clone, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_CancellationToken_cancel", _wrap_ddog_CancellationToken_cancel, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_CancellationToken_drop", _wrap_ddog_CancellationToken_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_new", _wrap_ddog_prof_Profile_new, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_drop", _wrap_ddog_prof_Profile_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_add", _wrap_ddog_prof_Profile_add, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_set_endpoint", _wrap_ddog_prof_Profile_set_endpoint, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_add_endpoint_count", _wrap_ddog_prof_Profile_add_endpoint_count, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_add_upscaling_rule_poisson", _wrap_ddog_prof_Profile_add_upscaling_rule_poisson, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_add_upscaling_rule_proportional", _wrap_ddog_prof_Profile_add_upscaling_rule_proportional, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_EncodedProfile_drop", _wrap_ddog_prof_EncodedProfile_drop, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_serialize", _wrap_ddog_prof_Profile_serialize, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_Vec_U8_as_slice", _wrap_ddog_Vec_U8_as_slice, -1); + rb_define_module_function(mLibdatadog_ruby, "ddog_prof_Profile_reset", _wrap_ddog_prof_Profile_reset, -1); +} + diff --git a/libdatadog_swig_demo.rb b/libdatadog_swig_demo.rb new file mode 100644 index 00000000000..8cc781cc0a9 --- /dev/null +++ b/libdatadog_swig_demo.rb @@ -0,0 +1,50 @@ +require 'pry' +require 'libdatadog' +require 'libdatadog_ruby' + +# TODO: Move this inside swig... +def to_charslice(string) + Libdatadog_ruby::Ddog_Slice_CChar.new.tap do |it| + it.ptr = string + it.len = string.bytesize + end +end + +def trigger + config = Libdatadog_ruby::Ddog_prof_CrashtrackerConfiguration.new + # config.additional_files = # Leave it empty + config.create_alt_stack = false + # Todo: Can we group "classes" inside swig? + config.endpoint = Libdatadog_ruby.ddog_prof_Endpoint_agent(to_charslice('http://localhost:8126/')) + config.resolve_frames = Libdatadog_ruby::DDOG_PROF_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER + config.timeout_secs = 10 + config.wait_for_receiver = true + + metadata = Libdatadog_ruby::Ddog_prof_CrashtrackerMetadata.new + metadata.profiling_library_name = to_charslice("dd-trace-rb123") + metadata.profiling_library_version = to_charslice("this-is-a-version") + metadata.family = to_charslice("this-is-a-family") + #metadata.tags # no tags for now + + receiver_config = Libdatadog_ruby::Ddog_prof_CrashtrackerReceiverConfig.new + # receiver_config.args # no args for now + #receiver_config.env # no env for now + receiver_config.path_to_receiver_binary = to_charslice(Libdatadog.path_to_crashtracking_receiver_binary) + #receiver + + result = Libdatadog_ruby::ddog_prof_Crashtracker_init_with_receiver(config, receiver_config, metadata) + + if result.tag == Libdatadog_ruby::DDOG_PROF_CRASHTRACKER_RESULT_ERR + puts "Failed to start: #{result.err}" + else + puts "Started successfully!" + end +end + +trigger + +puts "Libdatadog reports library path as #{Libdatadog.ld_library_path}" +ENV['LD_LIBRARY_PATH'] = Libdatadog.ld_library_path + +puts "Crashing Ruby..." +Process.kill('SEGV', Process.pid)