From: rafl Date: Sun, 12 Oct 2008 14:26:44 +0000 (+0000) Subject: Make get_linestr return NULL/undef if we aren't parsing. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=06aa4a3e63290b8ae8b98ec42083704e96c8d4ca;p=p5sagit%2FDevel-Declare.git Make get_linestr return NULL/undef if we aren't parsing. git-svn-id: http://dev.catalyst.perl.org/repos/bast/Devel-Declare/1.000/trunk@4916 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- 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); }