[Geany-devel] struct names / geany macro

Enrico Tröger enrico.troeger at xxxxx
Thu May 29 18:07:54 UTC 2008


On Wed, 28 May 2008 17:46:36 +0200, Enrico Tröger
<enrico.troeger at uvena.de> wrote:

> On Tue, 27 May 2008 15:34:02 +0100, Nick Treleaven
> <nick.treleaven at btinternet.com> wrote:
> 
> > On Mon, 26 May 2008 13:03:21 +0100
> > Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> > 
> > > On Sun, 25 May 2008 22:20:01 +0200
> > > Enrico Tröger <enrico.troeger at uvena.de> wrote:
> > ...
> > > > I started using the underscores because I thought this is common
> > > > practise (at least I read a lot of code where underscores are
> > > > used) and at some point there were problems if structs and types
> > > > had the same name, so the easiest solution was to prefix the
> > > > struct name with
> > > 
> > > Do you remember what problems there were?
> > 
> > Just to add info:
> > 
> > Although I haven't yet found a link to the relevant part of the ISO
> > C90 standard, I've read elsewhere that struct names and typedef
> > names have separate namespaces.
> > 
> > http://blogs.msdn.com/oldnewthing/archive/2008/03/26/8336829.aspx
> > 
> > So for new code (such as our API) it ought to be fine to use the
> > same name for each. Also I'm pretty sure I'd done this a few times
> > already
> 
> Ok, so let's use the same names for structs and typedefs.

Done (except I forgot one).


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20080529/0c264406/attachment.pgp>


More information about the Devel mailing list