Re: [AD] Documentation update

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I disagree. If there's a hardcoded limit to the stringlength of
> a certain function, it's important to know what it is. If it's bad
> enough that we have to place a warning in the documentation, we should
> definitely list the actual length limit of the string.

The problem is, Allegro is riddled with internal limitations on the size of
buffers. I don't want to open a can of worms by accepting a first patch that
hardcodes one of them. The patch is interesting only because it mentions the
workaround. A more interesting one would be a patch that lifts the
limitation.

> Otherwise a programmer has to dive into the allegro source to find out,
> or worse, use trial and error to find out what the limit is and hope that
> the program stops nicely when it is exceeded instead of running on
> with corrupted memory. (I assume there's an assert on exceeding the
> stringlength?)

Internal limitations are not easy to document, because they are usually not
directly translatable into limitations on the parameters of a API function.
As for the failure mode, it is simple: null-terminated truncation, we have a
very effective API for that.

--
Eric Botcazou






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/