[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ibija-devel] ninja memory allocator
From: |
Dodji Seketeli |
Subject: |
Re: [Ibija-devel] ninja memory allocator |
Date: |
Fri, 16 Aug 2002 00:08:07 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610 |
Clement Clement wrote:
I'm ok with your comments,
but I thing that the PRIVATE MACRO must be global to th project
Hmmh I understand your point of view .
Anyway, the idea being defining it in each file is that this macro has
a PRIVATE SCOPE. Each function/macro to be exported must be prefixed
by the name of the file where it is defined.
If a macro/function name is not prefixed by the name of it file (let say
it namespace) that means that it is defined in the current file and has
a private scope. You get it ?
Another way of seing it is that tomorrow, we can for example
change the layout of the private part of a particular object
(remember: we will be dealing with garbage collection and so on ...)
So a particular object may have his private layout changed so that
you will have to access it through my_object->priv->real_private_part
for example ... we don't know the future so must make sure that we will
be able to make our software evolve with a minimum of effort and with
the maximum of elegance.
So keeping this macro in a private scope gives us room for future
improvement without increasing the amount of code. (it's just a macro).
--
Dodji
To follow the path: look to the master, follow the master,
walk with the master, see through the master, become the master.