fixup ruby NetAddress.to_s
This commit is contained in:
parent
a67de34fcd
commit
eec208a660
|
@ -2140,7 +2140,7 @@ our %field_types = (
|
||||||
Int => "rb_int2inum",
|
Int => "rb_int2inum",
|
||||||
Char => "CHR2FIX",
|
Char => "CHR2FIX",
|
||||||
String => "rb_str_new2",
|
String => "rb_str_new2",
|
||||||
NetAddress => "rb_sigar_net_address_to_string",
|
NetAddress => "rb_sigar_net_address_to_s",
|
||||||
);
|
);
|
||||||
|
|
||||||
my $rx_file = 'rbsigar_generated.rx';
|
my $rx_file = 'rbsigar_generated.rx';
|
||||||
|
|
|
@ -59,13 +59,15 @@ static VALUE rb_sigar_net_interface_flags_to_s(VALUE rclass, VALUE flags)
|
||||||
return rb_str_new2(sigar_net_interface_flags_to_string(NUM2LL(flags), buffer));
|
return rb_str_new2(sigar_net_interface_flags_to_string(NUM2LL(flags), buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE rb_sigar_net_address_to_string(sigar_net_address_t address)
|
static VALUE rb_sigar_net_address_to_string(sigar_net_address_t *address)
|
||||||
{
|
{
|
||||||
char addr_str[SIGAR_INET6_ADDRSTRLEN];
|
char addr_str[SIGAR_INET6_ADDRSTRLEN];
|
||||||
sigar_net_address_to_string(NULL, &address, addr_str);
|
sigar_net_address_to_string(NULL, address, addr_str);
|
||||||
return rb_str_new2(addr_str);
|
return rb_str_new2(addr_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define rb_sigar_net_address_to_s(a) rb_sigar_net_address_to_string(&a)
|
||||||
|
|
||||||
static VALUE rb_sigar_new_list(char *data, unsigned long number,
|
static VALUE rb_sigar_new_list(char *data, unsigned long number,
|
||||||
int size, VALUE rclass)
|
int size, VALUE rclass)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue