[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC] Generating Go bindings for libxl



Hi George,

> Just going through in detail, I notice one thing about your
> implementation of Defbool: you simply copy over the value of
> libxl_defbool.  The header says of libxl_defbool:
>
>  * Users should treat this struct as opaque and use the following
>  * defined macros and accessor functions.
>
> The meaning of 'val' is unlikely to change, but in theory it could.  So
> I think the fromC method should do something like:
>
> if ( C.libxl_defbool_is_default(c) ) {
>     // Set d.val to 'default'
> } else if ( C.libxl_defbool_val(c) ) {
>     // Set d.val to 'true'
> } else {
>     // Set d.val to 'false'
> }
>
> And of course, Defbool will need similar methods for external callers.

Okay that makes sense, thanks.

> But we're going to have to find a better way to review the changes
> you're making.  Would it be too much to ask you to break the series down
> into individual chunks that each made one logical change, and sending
> the results to the list?
>
> [...]
>
> What do you think?

No problem, I can do that. I'll send the patches along soon.

-NR
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.