[MPlayer-dev-eng] [PATCH] get rid of *void pointer arithemtic in libvo/fastmemcpy.h

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Jan 26 10:52:56 CET 2007


Hello,
On Thu, Jan 25, 2007 at 03:43:12PM -0500, Rich Felker wrote:
> On Thu, Jan 25, 2007 at 07:17:34PM +0100, Reimar Döffinger wrote:
> > > >Instead either cast or use a local variable with appropriate type IMO
> > > 
> > > Attached patch implements the solution with casts, with uint8_t*.
> > > 
> > > If you prefer char* or whatever else, then I can change it before 
> > > committing.
> > 
> > I personally prefer using (u)int8_t for arbitrary data and char* only for
> > strings, so not I don't want to change it.
> > I think it is fine, and doesn't affect readability too much. Any
> > objections?
> 
> I prefer char (and generally avoiding uint*_t unless it's really
> needed), but that's just my personal preference. I don't object to
> using uint8_t if you prefer it.

I don't mind much either, it's just become a convention for my own code
to use char * only for strings (i.e. actual "characters").
In part also because once you want to do some operations on it you will
have to cast it to (u)int8_t anyway (though that later one I admit is
probably true for UTF-8 strings, too).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list