| I am just looking through various changes over the past few months and I
noticed a number of things that make me wonder if API compatibility is being
preserved.
Most recently, two new variables, spoutlock and spinlock, were added to the
middle of the public section of the CSOUND struct:
int ksmps, global_ksmps, nchnls, spoutactive, spoutlock, spinlock;
Also, I am wondering what the size of a long is on 64-bit architectures?
With all of the changes of short to int16 and long to int32, the signatures
for several of the function pointers in the CSOUND struct have changed. If
long is 64 bits wide on some architectures, this change is a problem. A few
public data structures may have been changed this way also.
One other subtle type change is the following:
void (*AuxAlloc)(CSOUND *, long nbytes, AUXCH *auxchp);
void (*AuxAlloc)(CSOUND *, size_t nbytes, AUXCH *auxchp);
typedef struct auxch {
struct auxch *nxtchp;
long size;
void *auxp, *endp; /* was char* */
} AUXCH;
typedef struct auxch {
struct auxch *nxtchp;
size_t size;
void *auxp, *endp;
} AUXCH;
At least on my system, long and size_t are not the same. size_t is an
unsigned long. I suppose that this will not cause any problems unless an
AUXCH has a size greater than MAX_LONG or if there is a bigger difference
between these two types on some other architecture.
Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |