| I don’t think this is in the public API. It can be accessed by opcodes, so we might only need
to worry about third-party ones, of which there aren’t many that I know off.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie
On 9 Jul 2014, at 12:57, Andres Cabrera wrote:
> Maybe there should be an API version bump? Although that seems so obscure I doubt that is actually being used.
>
> Cheers,
> Andrés
>
>
> On Tue, Jul 8, 2014 at 6:24 PM, Steven Yi wrote:
> Hi Felipe,
>
> Unfortunately, no. The whole thing about CS_VAR_MEM is that it has to
> have the CS_TYPE before the MYFLT. That's because whatever the
> memBlock is can be of any size. In the case of CS_VAR_MEM, it's just
> a single MYFLT, but in other places, the memBlock can be things like
> sizeof(STRINGDAT) or something else.
>
> The trick to this runtime type-identification is that when an opcode
> gets a value set as an argument, it can look one CS_TYPE* below the
> arg ptr to get the type. That allows us not to change any of the
> opcodes, but still gain the runtime type. Because this mechanism
> works this way, it means all of the args, whether it's a pfield, local
> var, global var, etc., have to work the same way.
>
> It's a little hard for me to explain, so if that's confusing, let me
> know. I can work on a memory layout diagram to clarify.
>
> steven
>
>
> On Tue, Jul 8, 2014 at 3:23 PM, Felipe Sateler wrote:
> > Couldn't it be changed to put the CS_VAR_TYPEs after the MYFLTs?
> >
> > This would allow not breaking the ABI, as far as I can see.
> >
> > On Tue, Jul 8, 2014 at 3:11 PM, Victor Lazzarini
> > wrote:
> >> No, that’s not correct. We can have as many strings as we’d like now.
> >> ========================
> >> Dr Victor Lazzarini
> >> Senior Lecturer
> >> NUI Maynooth, Ireland
> >> victor dot lazzarini at nuim dot ie
> >>
> >>
> >>
> >>
> >> On 8 Jul 2014, at 19:38, Steven Yi wrote:
> >>
> >>> It's in prototyp.h, but also in the CSOUND* struct. (Not sure if
> >>> what's in prototyp.h get's publicized.)
> >>>
> >>> Also, if I understand correctly, we still only have one pfield allowed
> >>> to have a string argument per event. Is this correct? (The test csd
> >>> I wrote seems to confirm this). If so, then perhaps now would be a
> >>> good time to change that to allow any number of string pfields.
> >>>
> >>> On Tue, Jul 8, 2014 at 2:25 PM, Victor Lazzarini
> >>> wrote:
> >>>> Is that in the public API?
> >>>> ========================
> >>>> Dr Victor Lazzarini
> >>>> Senior Lecturer
> >>>> NUI Maynooth, Ireland
> >>>> victor dot lazzarini at nuim dot ie
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On 8 Jul 2014, at 19:14, Steven Yi wrote:
> >>>>
> >>>>> Hi All,
> >>>>>
> >>>>> Is anyone using csoundGetPfields()? I'm looking at changing how
> >>>>> pfields are stored (using CS_VAR_MEM instead of MYFLT). This would
> >>>>> break csoundGetPFields(), though csoundGetPfields could be updated to
> >>>>> return a CS_VAR_MEM** instead.
> >>>>>
> >>>>> The idea is that pfields would have type information with it.
> >>>>>
> >>>>> The changed part of the INSDS struct then would change from:
> >>>>>
> >>>>> char *strarg; /* string argument */
> >>>>> /* Copy of required p-field values for quick access */
> >>>>> MYFLT p0;
> >>>>> MYFLT p1;
> >>>>> MYFLT p2;
> >>>>> MYFLT p3;
> >>>>> } INSDS;
> >>>>>
> >>>>> to:
> >>>>>
> >>>>> char *strarg; /* string argument */
> >>>>> /* Copy of required p-field values for quick access */
> >>>>> CS_VAR_TYPE* p0_type;
> >>>>> MYFLT p0;
> >>>>> CS_VAR_TYPE* p1_type;
> >>>>> MYFLT p1;
> >>>>> CS_VAR_TYPE* p2_type;
> >>>>> MYFLT p2;
> >>>>> CS_VAR_TYPE* p3_type;
> >>>>> MYFLT p3;
> >>>>> } INSDS;
> >>>>>
> >>>>> As a reminder, CS_VAR_MEM is currently defined as:
> >>>>>
> >>>>> typedef struct csvarmem {
> >>>>> CS_TYPE* varType;
> >>>>> MYFLT memBlock;
> >>>>> } CS_VAR_MEM;
> >>>>>
> >>>>> We would then be able to cast the address of p0_type as a CS_VAR_MEM*
> >>>>> and can use array access to get other pfields.
> >>>>>
> >>>>> The above change allows to continue using efficient access to p1, p2,
> >>>>> and p3, but also have a way to access all pfields as CS_VAR_MEM's.
> >>>>> That simplifies the calculations a bit when figuring out the INSDS
> >>>>> memblock to allocate.
> >>>>>
> >>>>> steven
> >>>>>
> >>>>> ------------------------------------------------------------------------------
> >>>>> Open source business process management suite built on Java and Eclipse
> >>>>> Turn processes into business applications with Bonita BPM Community Edition
> >>>>> Quickly connect people, data, and systems into organized workflows
> >>>>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> >>>>> http://p.sf.net/sfu/Bonitasoft
> >>>>> _______________________________________________
> >>>>> Csound-devel mailing list
> >>>>> Csound-devel@lists.sourceforge.net
> >>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>>>
> >>>>
> >>>> ------------------------------------------------------------------------------
> >>>> Open source business process management suite built on Java and Eclipse
> >>>> Turn processes into business applications with Bonita BPM Community Edition
> >>>> Quickly connect people, data, and systems into organized workflows
> >>>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> >>>> http://p.sf.net/sfu/Bonitasoft
> >>>> _______________________________________________
> >>>> Csound-devel mailing list
> >>>> Csound-devel@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>>
> >>> ------------------------------------------------------------------------------
> >>> Open source business process management suite built on Java and Eclipse
> >>> Turn processes into business applications with Bonita BPM Community Edition
> >>> Quickly connect people, data, and systems into organized workflows
> >>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> >>> http://p.sf.net/sfu/Bonitasoft
> >>> _______________________________________________
> >>> Csound-devel mailing list
> >>> Csound-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Open source business process management suite built on Java and Eclipse
> >> Turn processes into business applications with Bonita BPM Community Edition
> >> Quickly connect people, data, and systems into organized workflows
> >> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> >> http://p.sf.net/sfu/Bonitasoft
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> >
> > --
> >
> > Saludos,
> > Felipe Sateler
> >
> > ------------------------------------------------------------------------------
> > Open source business process management suite built on Java and Eclipse
> > Turn processes into business applications with Bonita BPM Community Edition
> > Quickly connect people, data, and systems into organized workflows
> > Winner of BOSSIE, CODIE, OW2 and Gartner awards
> > http://p.sf.net/sfu/Bonitasoft
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |