Re: [AD] Export AL_VECTOR |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-06-18, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> I would like to see AL_VECTOR be a public Allegro 5 api. The fshook stuff
> would like to deal with paths a lot, and the splitdir/catdir set of functions
> would be greatly simplified with a public vector interface.
>
> I've asked around a little, and have found that people would indeed use
> splitdir and catdir and related functions, the problem is, without a
> resizeable array api to give to the caller, it would be hard, if not
> impossible to resize the char** array if needed (to pass back to
> catdir/catpath etc).
>
> I'm trying to make this an api that people would actually want to use over the
> various system specific apis, making common actions with paths simpler.
> Without it I think allegro is missing a very important /platform/ feature.
> Allegro is a platform, and a platform needs a good set of consistent file and
> path api functions.
>
> Without a public AL_VECTOR, I'd have to either use char** arrays, or implement
> my own dynamic array api just for the fs api. I find that wrong on a few
> levels.
You can export an (opaque) resizable array API which is specific to the
fs API, and implement that using _AL_VECTOR. Would that be okay?
I'm not completely against exporting a generic resizable array API but
the _AL_VECTOR interface isn't that good. We want to be able to change
it without breaking backwards compatibility with user programs.
Peter