summaryrefslogtreecommitdiffstats
path: root/CompleteStatement.xs
diff options
context:
space:
mode:
Diffstat (limited to 'CompleteStatement.xs')
-rw-r--r--CompleteStatement.xs8
1 files changed, 6 insertions, 2 deletions
diff --git a/CompleteStatement.xs b/CompleteStatement.xs
index aee013a..503e5f2 100644
--- a/CompleteStatement.xs
+++ b/CompleteStatement.xs
@@ -54,7 +54,7 @@ _parse()
LEAVE;
-int
+SV *
complete_statement(str)
SV *str
PREINIT:
@@ -116,7 +116,11 @@ complete_statement(str)
call_parse();
- RETVAL = (depth == 0);
+ RETVAL = (PL_parser->bufptr != PL_parser->bufend)
+ ? &PL_sv_undef
+ : (depth == 0)
+ ? &PL_sv_yes
+ : &PL_sv_no;
FREETMPS;
LEAVE;