At 2003-12-07 18:19:26 +0100, [EMAIL PROTECTED] wrote:
There is a new type in C99 for integer that can hold a pointer
value. I think it's called intptr_t resp. uintptr_t, but I don't have
the standard around.
Yes, they're called intptr_t and uintptr_t (ยง7.18.1.4), but they're both
optional
Dann Corbit [EMAIL PROTECTED] writes:
From the C-FAQ:
A:Not portably, it doesn't. It attempts to modify the variable a
twice between sequence points, so its behavior is undefined.
10.3: How can I write a generic macro to swap two values?
Neither of these are really relevant,
Greg Stark [EMAIL PROTECTED] writes:
Treating pointers as integers is technically nonportable but
realistically you would be pretty hard pressed to find any
architecture anyone runs postgres on where there isn't some integer
datatype that you can cast both directions from pointers safely.
...
Tom Lane wrote:
Greg Stark [EMAIL PROTECTED] writes:
Treating pointers as integers is technically nonportable but
realistically you would be pretty hard pressed to find any
architecture anyone runs postgres on where there isn't some integer
datatype that you can cast both directions from
If I'm not wrong Neil Conway is working on
reimplement a double linked list.
Looking around I found this post of
Herb Sutter on comp.lang.c++:
In particular, a motivation behind two-way pointers is that you
can have a more
, passing the known pointer value
around would take more coding than maintaining two pointers in the list.
Richard Schilling
- Begin Forwarded Message -
Date: 2003.12.06 08:03
Subject: [HACKERS] Double linked list with one pointer
From: Gaetano Mendola [EMAIL PROTECTED]
To: [EMAIL PROTECTED
Gaetano Mendola [EMAIL PROTECTED] writes:
If I'm not wrong Neil Conway is working on
reimplement a double linked list.
No, he's working on keeping track of the list tail element (and length,
but the tail element is the important part). There was nothing about
double linking.
In particular, a
Gaetano Mendola wrote:
If I'm not wrong Neil Conway is working on
reimplement a double linked list.
Looking around I found this post of
Herb Sutter on comp.lang.c++:
In particular, a motivation behind two-way pointers
-Original Message-
From: Bruce Momjian [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 06, 2003 5:02 PM
To: Gaetano Mendola
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] Double linked list with one pointer
Gaetano Mendola wrote:
If I'm not wrong Neil Conway is working
Bruce Momjian wrote:
Gaetano Mendola wrote:
I don't think the article is available online, alas, but you can find some
related source code demonstrating the technique at:
http://www.semantics.org/tyr/tyr0_5/list.h
That certainly is an amazing idea. You know the pointer you are
Andrew Dunstan wrote:
Bruce Momjian wrote:
Gaetano Mendola wrote:
I don't think the article is available online, alas, but you can find some
related source code demonstrating the technique at:
http://www.semantics.org/tyr/tyr0_5/list.h
That certainly is an amazing
Andrew Dunstan [EMAIL PROTECTED] writes:
I must confess that it strikes me as a really really horrid and ugly
hack - very likely to be error-prone and non-portable and undebuggable,
and for almost no saving worth having. But maybe that's just me.
No, that was exactly my reaction too. I'd be
12 matches
Mail list logo