nel-all
[Top][All Lists]
Advanced

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

Re: [Nel] GNU/Linux patches


From: Loic Dachary
Subject: Re: [Nel] GNU/Linux patches
Date: Thu, 21 Mar 2002 14:53:07 +0100

[Obsolete reading, Vianey told me on IRC that this was done this morning.]

Vianney Lecroart writes:
 > 
 > Please, we don't want to apply the inline stuffs in your way because we
 > *need* these inline because the function are called often. As we don't have
 > gcc3.0 and that it compiles on 2.95.2, we can't do test, but try to add
 > inline also in the .h instead of removing the inline keyword because we need
 > these functions to be inline. Anyway, we have to find another way to fix
 > this problem and keep inlining these functions

        This is not a gcc3 specific problem (in fact I'm using gcc-2.95.4).
But I see the point. If you need your functions to be inlined, they should
be defined in the headers. Although this is not mandatory, doing otherwise
leaves out at the mercy of the compiler. "To make inlining possible in the
absence of unusually clever compilation and linking facilities, the
definition - and not just the delcaration - of an inline function must be
in scope" (The C++ Programming Language third edition, P144). 

        As it turns out your compiler does something that does not
trigger problems. I would not go as far as to say that it indeed does
the right thing, that remains to be proved ;-). I won't speculate
too much on this subject. I hope you'll find reasonable to say that
inline functions should indeed be defined in the header files.

        In order to define the functions that are desired inline and
satisfy any reasonable C++ compiler, I propose the patch attached
below.  It moves the definitions of inlined functions to header files
(driver_opengl_material.h for instance) that are included in driver_opengl.h.
This keeps the definition in separate files instead of stacking them into
driver_openg.h, matches Bjarne Stroustrup recommendation and is portable.

 > > - additional client.cfg.in so that GNU/Linux installations know
 > >   where to fetch the data
 > 
 > hum. I don't see stuffs like these in the patch.

        Not in the patch, that's right, it was in the attached file.

Attachment: patch.16
Description: Binary data

-- 
Loic   Dachary         http://www.dachary.org/  address@hidden
12 bd  Magenta         http://www.senga.org/      address@hidden
75010    Paris         T: 33 1 42 45 07 97          address@hidden
        GPG Public Key: http://www.dachary.org/loic/gpg.txt

reply via email to

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