Make get_linestr return NULL/undef if we aren't parsing.
Florian Ragwitz [Sun, 12 Oct 2008 14:26:44 +0000 (14:26 +0000)]
Declare.xs

index 3b8c5dd..69dd632 100644 (file)
@@ -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);
 }