diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-03-15 18:20:46 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-03-15 18:20:46 +0000 |
commit | eca0cebba197edbc6aa452c86e8019ab8b955c81 (patch) | |
tree | c247db45b9291d2e8f66aee6416242413150a622 /tools/libxl/libxl_internal.c | |
parent | d9e46835ab53a135e979cb7eb6febc5dc6f71a85 (diff) | |
download | xen-eca0cebba197edbc6aa452c86e8019ab8b955c81.tar.gz xen-eca0cebba197edbc6aa452c86e8019ab8b955c81.tar.bz2 xen-eca0cebba197edbc6aa452c86e8019ab8b955c81.zip |
libxl: Make all hidden/static functions take a gc not a ctx
Also ensure that static and hidden functions use the libxl__ prefix
not just libxl_ (in the case of static functions only when they use a
libxl prefix to start with).
This follows the policy described in libxl.h "libxl memory
management".
Based on a manual audit of:
grep ^static tools/libxl/libxl*.[ch]| grep libxl_ctx
grep libxl__ tools/libxl/*.h| grep libxl_ctx
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.c')
-rw-r--r-- | tools/libxl/libxl_internal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 2aa87f7181..046e4435c7 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -29,7 +29,7 @@ #include "libxl_internal.h" #include "libxl_utils.h" -int libxl__error_set(libxl_ctx *ctx, int code) +int libxl__error_set(libxl__gc *gc, int code) { return 0; } @@ -82,7 +82,7 @@ void *libxl__zalloc(libxl__gc *gc, int bytes) { void *ptr = calloc(bytes, 1); if (!ptr) { - libxl__error_set(libxl__gc_owner(gc), ENOMEM); + libxl__error_set(gc, ENOMEM); return NULL; } @@ -94,7 +94,7 @@ void *libxl__calloc(libxl__gc *gc, size_t nmemb, size_t size) { void *ptr = calloc(nmemb, size); if (!ptr) { - libxl__error_set(libxl__gc_owner(gc), ENOMEM); + libxl__error_set(gc, ENOMEM); return NULL; } |