[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] #include <*.c>
From: |
Brian Gough |
Subject: |
Re: [Bug-gsl] #include <*.c> |
Date: |
Fri, 21 Sep 2007 15:14:09 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI) |
At Thu, 20 Sep 2007 14:57:49 +0200,
Naor Jonathan wrote:
> I wanted to ask why these are not .h files, and to suggest changing
> the suffix to something other than .c. After I made such a change
> the whole library compiled effortlessly.
Hello,
The convention for this project has been that .h files contain
declarations and macros, while .c files contain actual code.
> Some packages allow the user to supply his/her own memory allocation
> function instead of malloc. Sometimes this is done by giving a
> pointer to such a function. I wanted to suggest replacing every
> malloc in the code with another function, say gsl_malloc, which
> could then be changed by the user. By default this function could
> just be a wrapper for the default malloc.
I have considered this in the past but decided against it. The same
effect can be achieved using the GNU linker --wrap option, and this
allows wrapping of any function not just malloc.
--
best regards,
Brian Gough