Ahh, so
typedef struct tagIGMPI_Plugin { struct IGMPI_PluginVtbl *Vtbl; } IGMPI_Plugin;
how about...
struct IGMPI_Plugin { struct IGMPI_Plugin *Vtbl; };
typedef struct IGMPI_Plugin IGMPI_Plugin;
Jeff
On Fri, Feb 11, 2005 at 10:50:47AM +1300, Jeff McClintock wrote:
typedef struct _IGMPI_Plugin { struct IGMPI_PluginVtbl *Vtbl; } IGMPI_Plugin;
symbols starting with _ are reserved, including struct names, I believe.
So the thing after 'struct' is the typename, the thing after the last curly bracket is a variable of that type?
Not when you've thrown a typedef in there. I'd advocate dumping the typedef altogether for structs.
So the variable name is a throwaway, doesn't matter what it's called? ...
In the above you have created 2 data types (well, one with an alias): "struct _IGMPI_Plugin" and "IGMPI_Plugin".
In the below you have created 2 data types (well, one with an alias): "struct IGMPI_Plugin" and "IGMPI_Plugin_temp".
typedef struct IGMPI_Plugin { struct IGMPI_PluginVtbl *Vtbl; } IGMPI_Plugin_temp;
I'd just as soon see
struct IGMPI_Plugin { struct IGMPI_PluginVtbl *Vtbl; };
which only creates "struct IGMPI_Plugin" as a type.
---------------------------------------------------------------------- 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
---------------------------------------------------------------------- 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