bug-gsl
[Top][All Lists]
Advanced

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

[Bug-gsl] CBLAS_INDEX


From: Maurício Antunes
Subject: [Bug-gsl] CBLAS_INDEX
Date: Sun, 20 Jun 2010 20:08:24 -0300

Hi,

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.

Thanks for your attention,

Maurício



reply via email to

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