mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Change the handling of private functions, safe_malloc etc.
Rename guestfs_safe_malloc et al to guestfs___safe_malloc etc. To use the private functions, code now has to define -DGUESTFS_PRIVATE_FUNCTIONS=1. This will make it easier for us in future to work out which programs are using these functions and to minimize both the number of programs and the functions they are calling. Note that the Perl, Python, OCaml, Ruby and Java bindings use guestfs_safe_* calls. None of the other bindings do. This is a bug (in the bindings using those functions): these functions will call the out of memory callback on failure. This function defaults to abort(), and since this happens from a language binding, there is no way to change this default.
This commit is contained in:
@@ -40,8 +40,11 @@ python_DATA = guestfs.py
|
||||
python_LTLIBRARIES = libguestfsmod.la
|
||||
|
||||
libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
|
||||
libguestfsmod_la_CFLAGS = -Wall -I$(PYTHON_INCLUDEDIR) \
|
||||
-I$(top_srcdir)/src -I$(top_builddir)/src
|
||||
libguestfsmod_la_CFLAGS = \
|
||||
-DGUESTFS_PRIVATE_FUNCTIONS=1 \
|
||||
-Wall \
|
||||
-I$(PYTHON_INCLUDEDIR) \
|
||||
-I$(top_srcdir)/src -I$(top_builddir)/src
|
||||
libguestfsmod_la_LIBADD = $(top_builddir)/src/libguestfs.la
|
||||
libguestfsmod_la_LDFLAGS = -avoid-version -shared
|
||||
|
||||
|
||||
Reference in New Issue
Block a user