Re: [Xen-devel] [PATCH v5 1/3] golang/xenlight: begin Go to C type marshaling

2020-01-16 Thread George Dunlap
On 1/16/20 4:50 PM, Nick Rosbrook wrote: >> Looks good! Only one question: >> >>> +if not is_castable: >>> +s += 'if err := x.{}.toC({}); err != nil >>> {{\n'.format(goname,cname) >> >> Err should be defined function-wide at this point. Are you using `:=` >> on purpose for some

Re: [Xen-devel] [PATCH v5 1/3] golang/xenlight: begin Go to C type marshaling

2020-01-16 Thread Nick Rosbrook
> Looks good! Only one question: > > > +if not is_castable: > > +s += 'if err := x.{}.toC({}); err != nil > > {{\n'.format(goname,cname) > > Err should be defined function-wide at this point. Are you using `:=` > on purpose for some reason? Would it make sense to make this `=`

Re: [Xen-devel] [PATCH v5 1/3] golang/xenlight: begin Go to C type marshaling

2020-01-16 Thread George Dunlap
On 1/4/20 9:00 PM, Nick Rosbrook wrote: > Implement conversions for basic types such as strings and integer > types in toC functions. > > Modify function signatures of toC implementations for builtin > types to be consistent with the signature of the generated toC > functions. > > Signed-off-by:

[Xen-devel] [PATCH v5 1/3] golang/xenlight: begin Go to C type marshaling

2020-01-04 Thread Nick Rosbrook
Implement conversions for basic types such as strings and integer types in toC functions. Modify function signatures of toC implementations for builtin types to be consistent with the signature of the generated toC functions. Signed-off-by: Nick Rosbrook --- Changes in v5: - Define