[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 329-gary-allow-RTLD_GLOBAL

From: Bob Friesenhahn
Subject: Re: 329-gary-allow-RTLD_GLOBAL
Date: Mon, 9 Apr 2007 10:52:18 -0500 (CDT)

On Mon, 9 Apr 2007, Ralf Wildenhues wrote:

The pthread interfaces don't assume that the object is a pointer so
they work differently than suggested.  Pointers are error prone so
they are best reserved for internal library interfaces if possible.

Wait.  If you have a pointer to a struct, then you have as much type
safety as you can get with C.

I don't see a 'struct' in my example. What I see is implementation-defined types which could be anything at all. :-)

The implementation is free to embed pointers in the API object.

If you don't pass pointers, then changing the object (e.g., its size)
will incompatibly change the ABI.  Only the API will remain compatible.

Right. The 'object' can be a container which contains only a pointer. The POSIX approach leaves the approach used completely up to the designer. The designer could use malloc to allocate additional options space from the heap, or he could use a simple 'unsigned int' to store option flags and require no heap allocation.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]