Re: [ovs-dev] [PATCHv2 1/4] ovsdb-idl: Avoid class declaration.

2017-08-10 Thread Ben Pfaff
On Thu, Aug 10, 2017 at 02:31:43PM -0700, Joe Stringer wrote: > On 10 August 2017 at 11:41, Ben Pfaff wrote: > > On Thu, Aug 10, 2017 at 01:01:32PM +0800, Gao Zhenyu wrote: > >> Besides of that, I see many places consume the table class. > >> Do you mind to make a macro helps to

Re: [ovs-dev] [PATCHv2 1/4] ovsdb-idl: Avoid class declaration.

2017-08-10 Thread Joe Stringer
On 10 August 2017 at 11:41, Ben Pfaff wrote: > On Thu, Aug 10, 2017 at 01:01:32PM +0800, Gao Zhenyu wrote: >> How about: >> struct ovsdb_idl_table { >> ... >> const struct ovsdb_idl_table_class *table_class >> >> } >> >> struct ovsdb_idl { >> >> const struct

Re: [ovs-dev] [PATCHv2 1/4] ovsdb-idl: Avoid class declaration.

2017-08-10 Thread Ben Pfaff
On Thu, Aug 10, 2017 at 01:01:32PM +0800, Gao Zhenyu wrote: > How about: > struct ovsdb_idl_table { > ... > const struct ovsdb_idl_table_class *table_class > > } > > struct ovsdb_idl { > > const struct ovsdb_idl_class *idl_class; > Why make it longer? > Besides of that,

Re: [ovs-dev] [PATCHv2 1/4] ovsdb-idl: Avoid class declaration.

2017-08-09 Thread Gao Zhenyu
How about: struct ovsdb_idl_table { ... const struct ovsdb_idl_table_class *table_class } struct ovsdb_idl { const struct ovsdb_idl_class *idl_class; Besides of that, I see many places consume the table class. Do you mind to make a macro helps to fetch the class? Like: