autoconf
[Top][All Lists]
Advanced

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

Re: Solving the config.h nightmare ?


From: Bob Friesenhahn
Subject: Re: Solving the config.h nightmare ?
Date: Sun, 23 Apr 2006 20:42:46 -0500 (CDT)

On Sun, 23 Apr 2006, Daniel Reed wrote:

On Sun, 23 Apr 2006, Bob Friesenhahn wrote:
Agreed. The other issue is that with an abstracted interface, performance can really suck.

Abstraction needn't necessarily have any impact on performance at all. You may be able to get by with something as simple as using a forwarded-only struct pointer in your API that is simply typedefined to be some build-environment-dependent type internally.

[ stuff removed ]

typedef struct nscreen_window_t {
        uint32_t framebuffer[1024][768];
        int     x, y;
} nscreen_window_t;

Your example seems to assume that the client app will not be manipulating 'framebuffer directly'. If it does (for performance reasons), then it needs to know that framebuffer is an array of uint32_t with a particular size.

This was a great example since it represents the main bit of configury in my library that needs to be remembered at install time. The type representing 'framebuffer' can be one of three possible sizes and the application is free to update it.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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