[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Static functions
From: Thiago Macieira <thiago.macieira () kdemail ! net>
Date: 2004-02-16 13:21:27
Message-ID: 200402161021.28080.thiago.macieira () kdemail ! net
[Download RAW message or body]
Dirk Mueller wrote:
>On Monday 16 February 2004 09:43, Rolf Magnus wrote:
>> Making them static in the namespace additionally prevents their
>> symbols from being exported.
>
>Can you give me an example snippet so I can understand better what
> you're saying here?
I believe he means that
namespace MyFunctions
{
void function();
}
is equivalent to
class MyFunctions
{
public:
static void function();
};
However, if you add "static" to the namespace above, the symbol won't
be exported, which is impossible with a class. See my e-mails on this
subject regarding the ELF headers (my readelf outputs).
PS: if anyone is wondering, the symbol mangling is different for the two
functions above, at least with g++.
--
Thiago Macieira - Registered Linux user #65028
thiago (AT) macieira (DOT) info
ICQ UIN: 1967141 PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic