projects
/
p5sagit/Devel-Declare.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
5f0b59d
)
Make get_linestr_offset return -1 if we're not parsing.
Florian Ragwitz [Sun, 12 Oct 2008 14:27:04 +0000 (14:27 +0000)]
Declare.xs
patch
|
blob
|
blame
|
history
diff --git
a/Declare.xs
b/Declare.xs
index
69dd632
..
7f383a8
100644
(file)
--- a/
Declare.xs
+++ b/
Declare.xs
@@
-139,7
+139,11
@@
char* dd_get_curstash_name(pTHX) {
}
int dd_get_linestr_offset(pTHX) {
- char* linestr = SvPVX(PL_linestr);
+ char* linestr;
+ if (!DD_HAVE_PARSER) {
+ return -1;
+ }
+ linestr = SvPVX(PL_linestr);
return PL_bufptr - linestr;
}