Sha256: 9fbbaeef309646c8e491f36165473619d7d2f259206d738bca62389010a26e74

Contents?: true

Size: 1.93 KB

Versions: 8

Compression:

Stored size: 1.93 KB

Contents

#ifndef __CS_COMMON
#define __CS_COMMON

#include <ruby.h>

typedef enum {
    IMPL_ALIAS_INSTANCE,
    IMPL_ALIAS_SINGLETON,
    IMPL_PREPEND
} patch_impl;

static VALUE cs__send_method;
static VALUE cs__alias_method_sym;

extern VALUE contrast, agent, patching, policy, assess;
extern VALUE core_extensions, core_assess;
extern VALUE assess_policy, assess_propagator;
extern VALUE funchook_path;

extern VALUE rb_sym_enter_scope;
extern VALUE rb_sym_exit_scope;
extern VALUE rb_sym_in_scope;
extern VALUE rb_sym_skip_contrast_analysis;
extern VALUE rb_sym_skip_assess_analysis;
extern VALUE rb_sym_method;
extern VALUE rb_sym_hash_get, rb_sym_hash_set, rb_sym_hash_tracked;

static VALUE patcher;
static VALUE rb_sym_instance_method;
static VALUE rb_sym_register_c_patch;
static VALUE rb_sym_alias_instance;
static VALUE rb_sym_alias_singleton;
static VALUE rb_sym_prepend;

void patch_via_funchook(void *original_function, void *hook_function);

void contrast_alias_method(const VALUE target, const char *to,
                           const char *from);

VALUE contrast_register_patch(const char *module_name, const char *method_name,
                              VALUE(c_fn)(const int, VALUE *,
                                          const VALUE));

VALUE contrast_register_singleton_patch(const char *module_name,
                                        const char *method_name,
                                        VALUE(c_fn)(const int, VALUE *,
                                                    const VALUE));

VALUE contrast_register_singleton_prepend_patch(
    const char *module_name, const char *method_name,
    VALUE(c_fn)(const int, VALUE *, const VALUE));

static VALUE
_contrast_register_patch(const char *module_name, const char *method_name,
                         VALUE(c_fn)(const int, VALUE *, const VALUE),
                         patch_impl patch_impl);

VALUE contrast_patcher();

void Init_cs__common(void);

#endif /* __CS_COMMON */

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
contrast-agent-4.11.0 ext/cs__common/cs__common.h
contrast-agent-4.10.0 ext/cs__common/cs__common.h
contrast-agent-4.9.1 ext/cs__common/cs__common.h
contrast-agent-4.9.0 ext/cs__common/cs__common.h
contrast-agent-4.8.0 ext/cs__common/cs__common.h
contrast-agent-4.7.0 ext/cs__common/cs__common.h
contrast-agent-4.6.0 ext/cs__common/cs__common.h
contrast-agent-4.5.0 ext/cs__common/cs__common.h