From: Ian Jackson Subject: Re: [PATCH v2-resend 14/30] libxl: ocaml: make Val_defbool GC-proof Date: Tue, 27 Aug 2013 16:48:36 +0100 Message-ID: <21020.51796.613286.722857@mariner.uk.xensource.com> References: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-15-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377168678-25492-15-git-send-email-rob.hoes@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rob Hoes Cc: ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 14/30] libxl: ocaml: make Val_defbool GC-proof"): > Signed-off-by: Rob Hoes I'm afraid I don't understand this at all. How does this make a difference ? (Also, these changes... > + bool b; > - bool b = libxl_defbool_val(c_val); > + b = libxl_defbool_val(c_val); ... definitely don't have any purpose.) So, the remaining key change is this: bool b = libxl_defbool_val(c_val); > - v = Val_some(b ? Val_bool(true) : Val_bool(false)); > + v1 = b ? Val_bool(true) : Val_bool(false); > + v2 = Val_some(v1); Assuming that Val_some is a function, I think this has no semantic difference. Can you explain what the difference is ? Ian.