From: Vincent Pit Date: Tue, 10 Mar 2009 16:03:09 +0000 (+0100) Subject: Prefer gv_stashpvn() to gv_stashpv() X-Git-Tag: v0.11~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=70e504e113b0833d5cbf0e6f4f9659fcbb765d70;p=perl%2Fmodules%2FLinux-SysInfo.git Prefer gv_stashpvn() to gv_stashpv() --- diff --git a/SysInfo.xs b/SysInfo.xs index 137884f..fdb289e 100644 --- a/SysInfo.xs +++ b/SysInfo.xs @@ -10,7 +10,8 @@ #include "perl.h" #include "XSUB.h" -#define __PACKAGE__ "Linux::SysInfo" +#define __PACKAGE__ "Linux::SysInfo" +#define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1) /* --- Extended fields ----------------------------------------------------- */ @@ -71,7 +72,7 @@ PROTOTYPES: ENABLE BOOT: { HV *stash; - stash = gv_stashpv(__PACKAGE__, TRUE); + stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, TRUE); newCONSTSUB(stash, "LS_HAS_EXTENDED", newSViv(LS_HAS_EXTENDED)); LS_KEY_DEFINE(uptime);