[Openal-devel] Making portable module portable again...
Sven Panne
Sven.Panne at aedion.de
Sun Feb 26 07:41:09 PST 2006
Am Sonntag, 26. Februar 2006 16:15 schrieb Prakash Punnoor:
> Am Sonntag Februar 26 2006 15:32 schrieb Prakash Punnoor:
> > But looking at the code I don't really understand what we need ssize_t
> > here? google tells me ptr_diff can be used instead. But on the other hand
> > the variables we are assigning are simple ints. SO why can't we use ints
> > here, as well?
>
> It should be "ptrdiff_t".. but, I'll set it to long (I guess int should
> also suffice), as we only pass into, unsigned int or longs to above two
> variables, so why make life complicated?
Well, IIRC the two occurences of ssize_t are probably related to buffer
handling/queueing, which I didn't have a look at yet, so I can't really
comment on this. But in any case this smells like "primitive obsession"
again, so some typedefs are probably appropriate, anyway.
Furthermore, I've been planning to introduce ssize_t into the backend API,
anyway to make this more POSIX-like, but I'll keep Windows in mind then.
Cheers,
S.
More information about the Openal-devel
mailing list