[gmpi] Re: Topic 3: Cross platform

  • From: "chris" <kjbeak@xxxxxxxxxxx>
  • To: <gmpi@xxxxxxxxxxxxx>
  • Date: Fri, 14 Mar 2003 17:12:02 -0000

----- Original Message -----
From: "Martijn Sipkema" <m.j.w.sipkema@xxxxxxxxxxxxxxxxxx>
To: <gmpi@xxxxxxxxxxxxx>
Sent: Friday, March 14, 2003 4:22 PM
Subject: [gmpi] Re: Topic 3: Cross platform


> [...]
> > I have a sugestion that we use a naming system where the bit size is
> > appended to the type. I cant remember where i got this from but it
avoids
> > any ambiguity with differant type names in diferant languages. You just
> > typedef these in the SDK.
> >
> > int8, int16, int32, int64
> >
> > uint8, uint16, uint32, uint64
>
> I think typedefs like these are in C99 and we should probably
> use those.
>
> > float32, float64, float80
>
> These don't make much sense. Just use float/double.

i just like the naming consistency.

> > bool8, bool16, bool32,
>
> C99 already has a boolean typedef IIRC. I fail to see the use of
> more than one boolean type...

Yeh i was just getting carried away :) I have had to use differant size
booleans to interface between diferant languages, it can somtimes be
beneficial for data alignment in structs.

> > i also think it should be explicitly defined what true and false are in
> > regard to booleans because some languages true and false are 0 and 1,
and
> in
> > others they are ==0 and <>0. This would probably be better aligned with
> the
> > C standard? For example in Delphi the default boolean is 0 and 1 so
> anything
> > <> 1 is false.
>
> Why is this necessary? Also "true" and "false" are C++ keywords and
> should not be used.

I am not saying they should be typedefed but it should be clear what a
boolean is at the bit level so that there is no ambiguity. If the host
writen in Delpi treats a boolean as (0:false, 1: true) and the plugin
written in C++ treats it as (0:false, <>0: true) then there is a potential
problem.

We want it to be language agnostic so you need to define what a
boolean/true/fasle is at machine level.

chris


----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: