From: Florian Ragwitz Date: Sun, 12 Oct 2008 14:26:44 +0000 (+0000) Subject: Make get_linestr return NULL/undef if we aren't parsing. X-Git-Tag: 0.005000~69 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f0b59d57f69eaed24fcdd8d75f40a91964e150c;p=p5sagit%2FDevel-Declare.git Make get_linestr return NULL/undef if we aren't parsing. --- diff --git a/Declare.xs b/Declare.xs index 3b8c5dd..69dd632 100644 --- a/Declare.xs +++ b/Declare.xs @@ -103,6 +103,9 @@ void dd_linestr_callback (pTHX_ char* type, char* name) { } char* dd_get_linestr(pTHX) { + if (!DD_HAVE_PARSER) { + return NULL; + } return SvPVX(PL_linestr); }