From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Re: forwarded message from David Mosberger
Date: Tue, 01 Aug 2000 00:03:05 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205258@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205257@msgid-missing>
>>>>> On 31 Jul 2000 19:53:20 -0400, Owen Taylor <otaylor@redhat.com> said:
>> #define int_to_any_type(i) ({any_type_t a; a.i = i;})
Owen> These are GCC specific. To be portable, you'd have to define
Owen> (possibly inline) functions instead of macros.
That's true. Since "inline" isn't really ANSI C either, regular
functions would have to be used (slow, but so what; I never understood
why GNU C is the only C variant to provide statement
expressions---it's a critically important feature when translating
other languages to C, for example).
Owen> Instead, if you are doing programming using GLib, you should
Owen> convert using:
Owen> GINT_TO_POINTER (i), GUINT_TO_POINTER (i) GPOINTER_TO_INT
Owen> (p), GPOINTER_TO_UINT (p)
Owen> Which are autoconf'ed to be correct for the platform in use.
Ah, that's fine then. As long as there is a clean way for source code
to express the conversion, I don't really care how it's implemented.
Sorry for faulting gtk/glib without checking first (it's been too long
since I programmed with this toolkit, so I didn't remember how this
was handled... ;-).
--david
next prev parent reply other threads:[~2000-08-01 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-31 23:53 [Linux-ia64] Re: forwarded message from David Mosberger Owen Taylor
2000-08-01 0:03 ` David Mosberger [this message]
2000-08-01 2:20 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590678205258@msgid-missing \
--to=davidm@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox