https://codereview.appspot.com/548030043/diff/559960055/lily/general-scheme.cc
File lily/general-scheme.cc (right):

https://codereview.appspot.com/548030043/diff/559960055/lily/general-scheme.cc#newcode778
lily/general-scheme.cc:778: free (a);
On 2020/05/02 10:15:40, hanwenn wrote:
> the code mixes setting up the GS instance (memory management etc) with
handling
> the file. Does it have to be this way? Can we have a 
> 
>   class Ghostscript {
>      process(string file, string device);
>      close();
>   };
> 
>   Ghostscript *get_gs(vector<string> args);
> 
> instead?
> 
> I think it should be possible to construct the API such that we always
have
> ly:gs , and that it falls back to shelling out to GS if the API is not
> available.

No, because there are two types of arguments when using the API: args
and device_args where the latter is added to command below. This uses a
different syntax and some properties are called differently
(HWResolution vs -r for example).

https://codereview.appspot.com/548030043/

Reply via email to