Re: [RESEND PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-07-07 Thread Nick Rosbrook
On Thu, Jul 01, 2021 at 02:09:47PM +, George Dunlap wrote: > > > > On Jun 21, 2021, at 5:11 PM, Nick Rosbrook wrote: > > > > On Fri, Jun 18, 2021 at 11:00:26AM +, George Dunlap wrote: > >> > >> > >>> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote: > >>> > >>> In gengotypes.py, the

Re: [RESEND PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-07-01 Thread George Dunlap
> On Jun 21, 2021, at 5:11 PM, Nick Rosbrook wrote: > > On Fri, Jun 18, 2021 at 11:00:26AM +, George Dunlap wrote: >> >> >>> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote: >>> >>> In gengotypes.py, the toC functions only set C string fields when >>> the Go strings are non-empty. Howe

Re: [RESEND PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-06-21 Thread Nick Rosbrook
On Fri, Jun 18, 2021 at 11:00:26AM +, George Dunlap wrote: > > > > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote: > > > > In gengotypes.py, the toC functions only set C string fields when > > the Go strings are non-empty. However, to prevent segfaults in some > > cases, these fields shou

Re: [RESEND PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-06-18 Thread George Dunlap
> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote: > > In gengotypes.py, the toC functions only set C string fields when > the Go strings are non-empty. However, to prevent segfaults in some > cases, these fields should always at least be set to nil so that the C > memory is zeroed out. > > U

[RESEND PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-05-24 Thread Nick Rosbrook
In gengotypes.py, the toC functions only set C string fields when the Go strings are non-empty. However, to prevent segfaults in some cases, these fields should always at least be set to nil so that the C memory is zeroed out. Update gengotypes.py so that the generated code always sets these field

[PATCH 03/12] golang/xenlight: fix string conversion in generated toC functions

2021-04-28 Thread Nick Rosbrook
In gengotypes.py, the toC functions only set C string fields when the Go strings are non-empty. However, to prevent segfaults in some cases, these fields should always at least be set to nil so that the C memory is zeroed out. Update gengotypes.py so that the generated code always sets these field