ext/pyroscope/pyroscope.c in pyroscope-0.0.10 vs ext/pyroscope/pyroscope.c in pyroscope-0.0.12

- old
+ new

@@ -6,11 +6,11 @@ #include <stdio.h> #include <string.h> int Start(char*, int, char*, char*); int Stop(int); -int ChangeName(char*); +int ChangeName(char*, int); static VALUE pyroscope_start(VALUE self, VALUE appName, VALUE pid, VALUE serverAddress) { VALUE r_appName = StringValue(appName); char *c_appName = RSTRING_PTR(r_appName); @@ -31,19 +31,21 @@ int res = Stop(c_pid); return INT2FIX(res); } static VALUE -pyroscope_change_name(VALUE self, VALUE appName) { +pyroscope_change_name(VALUE self, VALUE appName, VALUE pid) { VALUE r_appName = StringValue(appName); char *c_appName = RSTRING_PTR(r_appName); - int res = ChangeName(c_appName); + int c_pid = FIX2INT(pid); + + int res = ChangeName(c_appName, c_pid); return INT2FIX(res); } void Init_pyroscope_c() { rb_Pyroscope = rb_define_module("Pyroscope"); rb_define_module_function(rb_Pyroscope, "_start", pyroscope_start, 3); rb_define_module_function(rb_Pyroscope, "_stop", pyroscope_stop, 1); - rb_define_module_function(rb_Pyroscope, "_change_name", pyroscope_change_name, 1); + rb_define_module_function(rb_Pyroscope, "_change_name", pyroscope_change_name, 2); }