[Top][All Lists]

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

Re: [Bug-gsl] CBLAS_INDEX

From: Brian Gough
Subject: Re: [Bug-gsl] CBLAS_INDEX
Date: Mon, 21 Jun 2010 20:38:58 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

At Sun, 20 Jun 2010 20:08:24 -0300,
MaurĂ­cio Antunes wrote:
> I see that CBLAS_INDEX is defined in cblas.h using the preprocessor:
>     /*
>      * Enumerated and derived types
>      */
>     #define CBLAS_INDEX size_t  /* this may vary between platforms */
> Would you mind changing that #define to a typedef? I've just run
> into a small problem writing a language binding (to Haskell) that
> I believe others may run into as well. I use an actual C program to
> generate those bindings, and it contains macros working like that:
>     #define make_equivalent_type c_type \
>        do_lots_of_stuff...
>     make_equivalent_type (CBLAS_INDEX)
> This macro writes code that checks that type size, and also use
> its name as a string to be used to actually write bindings files.
> But since it's defined with the preprocessor, the type ended up
> beeing considered a redefinition of size_t.
> If there's no problem with the typedef, maybe it could help
> prevent others from equivalent problems.

I appreciate your problem but I'm disinclined to change the header
file as it has been frozen for many years (I don't want to break any
existing programs that might be using that).  Sorry. Presumably your
bindings are generated once rather than by the user so maybe you could
grab a local copy of the header and modify it with sed.

Brian Gough

reply via email to

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