guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #define SOMETHING some_value


From: Catonano
Subject: Re: #define SOMETHING some_value
Date: Fri, 16 Jun 2017 18:37:58 +0200

2017-06-15 21:21 GMT+02:00 Matt Wette <address@hidden>:

> I now have my ffi-helper automatically extracting #defines which are
> constants.
> I process on cairo-svg.h + cairo.h and get the following.  I don’t think
> defining
> and exporting all these as (define CAIRO_VERSION_MAJOR 1) etc is a good
> idea.
>
> Comments on this method of providing access?
>

Why didn't you use enumerations like cwebber did in his guile-squee ?

Just curious

Anyway, your ffi-helper is very interesting

I wonder if it could be used on Gnunet to re-do the guile bindings from
scratch




> Matt
>
> (define xxx-def-val
>   (let ((deftab
>         '((CAIRO_VERSION_MAJOR . 1)
>           (CAIRO_VERSION_MINOR . 14)
>           (CAIRO_VERSION_MICRO . 8)
>           (CAIRO_HAS_FC_FONT . 1)
>           (CAIRO_HAS_FT_FONT . 1)
>           (CAIRO_HAS_GOBJECT_FUNCTIONS . 1)
>           (CAIRO_HAS_IMAGE_SURFACE . 1)
>           (CAIRO_HAS_MIME_SURFACE . 1)
>           (CAIRO_HAS_OBSERVER_SURFACE . 1)
>           (CAIRO_HAS_PDF_SURFACE . 1)
>           (CAIRO_HAS_PNG_FUNCTIONS . 1)
>           (CAIRO_HAS_PS_SURFACE . 1)
>           (CAIRO_HAS_QUARTZ_FONT . 1)
>           (CAIRO_HAS_QUARTZ_IMAGE_SURFACE . 1)
>           (CAIRO_HAS_QUARTZ_SURFACE . 1)
>           (CAIRO_HAS_RECORDING_SURFACE . 1)
>           (CAIRO_HAS_SCRIPT_SURFACE . 1)
>           (CAIRO_HAS_SVG_SURFACE . 1)
>           (CAIRO_HAS_TEE_SURFACE . 1)
>           (CAIRO_HAS_USER_FONT . 1)
>           (CAIRO_HAS_XCB_SURFACE . 1)
>           (CAIRO_HAS_XLIB_SURFACE . 1)
>           (CAIRO_HAS_XLIB_XCB_FUNCTIONS . 1)
>           (CAIRO_HAS_XLIB_XRENDER_SURFACE . 1)
>           (CAIRO_HAS_XML_SURFACE . 1)
>           )))
>     (lambda (k) (assq-ref deftab k))))
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]