On Fri, Jan 8, 2021 at 5:44 PM JonnyRobbie via gegl-developer-list
<gegl-developer-list@gnome.org> wrote:
>
> > Maybe having
> > everything in the .c single file with enums and forward declarations
> > for the data early and the data after the operation code?
>
> Locally, I use an external python script in a meta-programming way to 
> generate the two included files from some input data. It doesn't depend on 
> any external library, but the main file depens on the two includes. I've 
> found it much easier to generate the includes from scratch and then simply 
> include them in the main c file rather then messing with file templats, etc. 
> in python. The two parts I generate are enums for property_enum() for ui 
> input (generated in the negative-darkroom-curve-enum.c) and the second 
> (negative-darkroom-curve-enum.h) is a struct initialization with all the 
> data. You can see the structure in the three attached files.
> But if you insist on having only one file, I might be able to rewrite that. 
> But messing with templating (locally - the PR for gegl would be clean) is a 
> pita.

The mailing-list strips attachments, you could generate the c file put
into GEGL on your side, though there is some precedent for having
external files in a fashion that could be followed while avoiding
having non-op sibling files in common/, the perlin-noise op which
includes files from gegl/operations/common/perlin.

/pippin
_______________________________________________
gegl-developer-list mailing list
List address:    gegl-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list

Reply via email to