Han-Wen Nienhuys <hanw...@gmail.com> writes:

> On Fri, Jun 19, 2020 at 12:50 PM Jonas Hahnfeld <hah...@hahnjo.de> wrote:
>> No changes for me. Please also keep in mind that the same command
>> string works via the API interpreter. It could be that this is related
>> to processing other files before the "empty" one...
>> I'll try to write a small wrapper around the API so we can test outside
>> of LilyPond what actually triggers the broken PDF.
>
> Your hunch is correct. No need to write a wrapper, the following in a
> .ly file works if you replace SCM_UNDEFINED with SCM_UNSPECIFIED in
> ly:gs-api

return SCM_UNDEFINED; is _NOT_ good behavior for Scheme functions.  I
have no idea why it is done here.  SCM_UNDEFINED is a special value for
the C API layer.  It is used internally for indicating non-existent data
members, or the end of variable-length argument lists.  Returning it to
the _Scheme_ layer should never be done.

For functions not returning a specific value, return SCM_UNSPECIFIED; is
the right course.

-- 
David Kastrup

          • Re... Jonas Hahnfeld via Discussions on LilyPond development
          • Re... Han-Wen Nienhuys
          • Re... Han-Wen Nienhuys
          • Re... Han-Wen Nienhuys
          • Re... Jonas Hahnfeld via Discussions on LilyPond development
          • Re... Jonas Hahnfeld via Discussions on LilyPond development
          • Re... Jonas Hahnfeld via Discussions on LilyPond development
          • Re... Han-Wen Nienhuys
          • Re... Jonas Hahnfeld via Discussions on LilyPond development
          • Re... Michael Käppler
          • Re... David Kastrup
          • Re... Han-Wen Nienhuys
          • Re... David Kastrup
  • Re: xdvipdfmx fails... Jonas Hahnfeld via Discussions on LilyPond development
  • Re: xdvipdfmx fails... Jonas Hahnfeld via Discussions on LilyPond development

Reply via email to