From aeefb88b487cfb5254967d15ac95c9169d95b9a6 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 3 Sep 2007 16:49:28 +0000 Subject: [PATCH] use SIGAR_NULL_HWADDR --- bindings/perl/Sigar.pm | 2 -- bindings/perl/Sigar.xs | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/perl/Sigar.pm b/bindings/perl/Sigar.pm index 76b66aa1..59ae79df 100644 --- a/bindings/perl/Sigar.pm +++ b/bindings/perl/Sigar.pm @@ -38,7 +38,5 @@ else { XSLoader::load(__PACKAGE__, $VERSION); } -sub NULL_HWADDR() { "00:00:00:00:00:00" } - 1; __END__ diff --git a/bindings/perl/Sigar.xs b/bindings/perl/Sigar.xs index 872c37c9..3bd0615f 100644 --- a/bindings/perl/Sigar.xs +++ b/bindings/perl/Sigar.xs @@ -137,6 +137,9 @@ static int proc_env_getvalue(void *data, #define XS_SIGAR_CONST_IV(name) \ (void)newCONSTSUB(stash, #name, newSViv(SIGAR_##name)) +#define XS_SIGAR_CONST_PV(name) \ + (void)newCONSTSUB(stash, #name, newSVpv(SIGAR_##name, 0)) + static void boot_Sigar_constants(pTHX) { HV *stash = gv_stashpv("Sigar", TRUE); @@ -151,6 +154,7 @@ static void boot_Sigar_constants(pTHX) XS_SIGAR_CONST_IV(IFF_PROMISC); XS_SIGAR_CONST_IV(IFF_ALLMULTI); XS_SIGAR_CONST_IV(IFF_MULTICAST); + XS_SIGAR_CONST_PV(NULL_HWADDR); } MODULE = Sigar PACKAGE = Sigar