Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Recent changes break API compatibility?

Date2008-09-09 13:30
FromMichael Gogins
SubjectRe: [Cs-dev] Recent changes break API compatibility?
You are correct, Csound API compatibility is not being preserved.

I also noticed that the Csound structure is not declared with sized types, e.g. int is used instead of int32 or int64 or whatever.

Regards,
Mike

-----Original Message-----
>From: Anthony Kozar 
>Sent: Sep 9, 2008 2:20 AM
>To: New Csound Developer list 
>Subject: [Cs-dev] Recent changes break API compatibility?
>
>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
>https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
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

Date2008-09-11 03:18
FromAnthony Kozar
SubjectRe: [Cs-dev] Recent changes break API compatibility?
I have confirmed that backwards compatibility of the Csound library has been
broken due (at least) to the addition of the spoutlock and spinlock struct
members below.  I tried a barmodel plugin compiled with 5.08 with the
current 5.09 sources and it crashed Csound.  No crash with pure 5.08 or puer
5.09.

Will this and any other potential breaks to the API be fixed before 5.09 is
released or will the API major version number be increased?

Anthony

Michael Gogins wrote on 9/9/08 8:30 AM:

> You are correct, Csound API compatibility is not being preserved.
> 
> I also noticed that the Csound structure is not declared with sized types,
> e.g. int is used instead of int32 or int64 or whatever.
> 
> Regards,
> Mike
> 
> -----Original Message-----
>> From: Anthony Kozar 
>> Sent: Sep 9, 2008 2:20 AM
>> To: New Csound Developer list 
>> Subject: [Cs-dev] Recent changes break API compatibility?
>> 
>> 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;


-------------------------------------------------------------------------
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

Date2008-09-11 13:24
Fromjpff
SubjectRe: [Cs-dev] Recent changes break API compatibility?
There is an expansion space for new variables in the structure, and
they should be used for the locks.
  Hum; tagged the code and built half my systems...
==John ffitch

-------------------------------------------------------------------------
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