From: Ian Campbell Subject: Re: [PATCH V4 03/24] libxl.h: document the paradigm of using libxl types Date: Tue, 6 May 2014 13:49:36 +0100 Message-ID: <1399380576.3014.116.camel@kazak.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-4-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398949101-23320-4-git-send-email-wei.liu2@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: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-05-01 at 13:58 +0100, Wei Liu wrote: > Signed-off-by: Wei Liu I think this reflects reality even if it's not what we would actually have wanted. Acked-by: Ian Campbell > --- > tools/libxl/libxl.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 2f14d26..b33460b 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -233,6 +233,11 @@ > * libxl_types.idl). The library provides a common set of methods for > * initialising and freeing these types. > * > + * The paradigm of using libxl types is that user always calls "init" > + * function before using a type, and always calls "dispose" after using > + * a type to clean up, regardless of the operations on this type > + * succeed or fail. See xl code for examples. > + * > * void libxl__init( *p): > * > * Initialises the members of "p" to all defaults. These may either