Comment #23 on issue 1096 by n.puttock: ly:parser-parse-string segfaults when directly called at toplevel
http://code.google.com/p/lilypond/issues/detail?id=1096

New patch with better message.

Thanks, looks OK. There are a few minor details which need fixing, but I'll sort them out when applying:

+  bool is_clean() const;

is_clean ()

+  if (!parser->lexer_->is_clean ()) {

brace on next line

+ parser->parser_error("ly:parser-parse-string is only valid with a new parser. "

space after parser_error
needs gettextifying for translations (_ ("..."))
no space at end of string (add to following string)

+    return SCM_UNSPECIFIED;
+  }

simpler to use `else' here

I assume you don't have tests for error conditions?

Only warning messages (which we'll eventually catch using warning-as-error).

Cheers,
Neil


_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to