Csound Csound-dev Csound-tekno Search About

[Cs-dev] CS_PDS now ambiguous

Date2013-03-03 14:57
FromMichael Gogins
Subject[Cs-dev] CS_PDS now ambiguous
AttachmentsNone  None  
What do we do about this?

In file included from /home/mkg/csound/OOps/ugens4.c:24:0:
/home/mkg/csound/./H/csoundCore.h:492:0: warning: "CS_PDS" redefined [enabled by default]
/home/mkg/csound/./H/csoundCore.h:489:0: note: this is the location of the previous definition

The definitions are in the following block of code in csoundCore.h.

Things like this are why we should avoid macros wherever possible.

#ifdef JPFF
#define CS_KSMPS     (p->h.insdshead->ksmps)
#define CS_KCNT      (p->h.insdshead->kcounter)
#define CS_EKR       (p->h.insdshead->ekr)
#define CS_ONEDKSMPS (p->h.insdshead->onedksmps)
#define CS_ONEDKR    (p->h.insdshead->onedkr)
#define CS_KICVT     (p->h.insdshead->kicvt)
#else
#define CS_KSMPS     (csound->GetKsmps(csound))
#define CS_KCNT      (csound->GetKcounter(csound))
#define CS_EKR       (csound->Getkr(csound))
#define CS_ONEDKSMPS (csound->onedksmps)
#define CS_ONEDKR    (csound->onedkr)
#define CS_KICVT     (csound->kicvt)
#define CS_PDS       (csound->pds)
#endif
#define CS_ESR       (csound->GetSr(csound))
#define CS_PDS       (p->h.insdshead->pds)



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Date2013-03-03 14:58
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] CS_PDS now ambiguous
> What do we do about this?
>

Editing error; remove > #define CS_PDS       (csound->pds)
> In file included from /home/mkg/csound/OOps/ugens4.c:24:0:
> /home/mkg/csound/./H/csoundCore.h:492:0: warning: "CS_PDS" redefined
> [enabled by default]
> /home/mkg/csound/./H/csoundCore.h:489:0: note: this is the location of the
> previous definition
>
> The definitions are in the following block of code in csoundCore.h.
>
> Things like this are why we should avoid macros wherever possible.
>
> #ifdef JPFF
> #define CS_KSMPS     (p->h.insdshead->ksmps)
> #define CS_KCNT      (p->h.insdshead->kcounter)
> #define CS_EKR       (p->h.insdshead->ekr)
> #define CS_ONEDKSMPS (p->h.insdshead->onedksmps)
> #define CS_ONEDKR    (p->h.insdshead->onedkr)
> #define CS_KICVT     (p->h.insdshead->kicvt)
> #else
> #define CS_KSMPS     (csound->GetKsmps(csound))
> #define CS_KCNT      (csound->GetKcounter(csound))
> #define CS_EKR       (csound->Getkr(csound))
> #define CS_ONEDKSMPS (csound->onedksmps)
> #define CS_ONEDKR    (csound->onedkr)
> #define CS_KICVT     (csound->kicvt)
> #define CS_PDS       (csound->pds)               <=======delete this
> #endif
> #define CS_ESR       (csound->GetSr(csound))
> #define CS_PDS       (p->h.insdshead->pds)
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-03-03 15:08
FromMichael Gogins
SubjectRe: [Cs-dev] CS_PDS now ambiguous
AttachmentsNone  None  
Thanks for your quick response!

My point about the macros remains.

Best,
Mike


On Sun, Mar 3, 2013 at 9:58 AM, <jpff@cs.bath.ac.uk> wrote:
> What do we do about this?
>

Editing error; remove > #define CS_PDS       (csound->pds)
> In file included from /home/mkg/csound/OOps/ugens4.c:24:0:
> /home/mkg/csound/./H/csoundCore.h:492:0: warning: "CS_PDS" redefined
> [enabled by default]
> /home/mkg/csound/./H/csoundCore.h:489:0: note: this is the location of the
> previous definition
>
> The definitions are in the following block of code in csoundCore.h.
>
> Things like this are why we should avoid macros wherever possible.
>
> #ifdef JPFF
> #define CS_KSMPS     (p->h.insdshead->ksmps)
> #define CS_KCNT      (p->h.insdshead->kcounter)
> #define CS_EKR       (p->h.insdshead->ekr)
> #define CS_ONEDKSMPS (p->h.insdshead->onedksmps)
> #define CS_ONEDKR    (p->h.insdshead->onedkr)
> #define CS_KICVT     (p->h.insdshead->kicvt)
> #else
> #define CS_KSMPS     (csound->GetKsmps(csound))
> #define CS_KCNT      (csound->GetKcounter(csound))
> #define CS_EKR       (csound->Getkr(csound))
> #define CS_ONEDKSMPS (csound->onedksmps)
> #define CS_ONEDKR    (csound->onedkr)
> #define CS_KICVT     (csound->kicvt)
> #define CS_PDS       (csound->pds)               <=======delete this
> #endif
> #define CS_ESR       (csound->GetSr(csound))
> #define CS_PDS       (p->h.insdshead->pds)
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com