Sha256: d1b30ab2c77f141acc5efb4d7fde8b097fdbb1624b4f0758d80b7bd717996567

Contents?: true

Size: 1.95 KB

Versions: 10

Compression:

Stored size: 1.95 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, const VALUE *,
                                          const VALUE));

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

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

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

VALUE contrast_patcher();

void Init_cs__common(void);

#endif /* __CS_COMMON */

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
contrast-agent-4.4.1 ext/cs__common/cs__common.h
contrast-agent-4.4.0 ext/cs__common/cs__common.h
contrast-agent-4.3.2 ext/cs__common/cs__common.h
contrast-agent-4.3.1 ext/cs__common/cs__common.h
contrast-agent-4.3.0 ext/cs__common/cs__common.h
contrast-agent-4.2.0 ext/cs__common/cs__common.h
contrast-agent-4.1.0 ext/cs__common/cs__common.h
contrast-agent-4.0.0 ext/cs__common/cs__common.h
contrast-agent-3.16.0 ext/cs__common/cs__common.h
contrast-agent-3.15.0 ext/cs__common/cs__common.h