1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-28 15:41:52 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
920be92397 Use static variables to store virPyDictToTypedParams hints
There is no need to have dynamic allocation every time the API
is called.  Rewrites commit <314b2346df>.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-02-19 15:55:28 +01:00
a03d782b3e move cpumap conversion code to a common helper
All libvirt_virDomainPin* functions do the same thing for convert
pycpumap to cpumap, so this patch moves all common logic to new
helper - virPyCpumapConvert.

Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
2016-11-11 13:44:44 +01:00
a3f842eea1 utils: introduce new macro helpers for tuple, list and dict objects
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-10-05 09:41:27 +02:00
a7d71b769d Move utils and shared code into libvirt-utils
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-10-05 08:35:05 +02:00
80c53727f3 Add space after comma for consistency with code style 2014-01-02 09:52:13 -06:00
c6ff569fb6 define __GNUC_PREREQ macro before using it
We brought over use of the __GNUC_PREREQ macro from libvirt but didn't
bring over the definition of it. This brings over the macro from libvirt
sources.
2013-12-30 12:36:31 -06:00
cabb24db9f maint: next release is 1.2.0
No other hits for:
git grep '1\.1\.5'

* libvirt-utils.h: Fix comment.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-11-25 08:49:44 -07:00
4d083fbf60 Import some virTypedParams* APIs from libvirt
virTypedParamsClear() and virTypedParamsFree() were introduced in
libvirt 1.0.2. In an effort to keep the code clean bring these two
functions to libvirt-python if we're building against a version of
libvirt that's older than 1.0.2
2013-11-22 15:58:06 +00:00
ac89e8177d Import LIBVIR_CHECK_VERSION macro from libvirt
Add LIBVIR_CHECK_VERSION from libvirt upstream so that we can check the
version of the library we are compiling against and support a range of
libvirt versions. The macro was added to libvirt in 1.2.0 so we must
provide it if its not defined.
2013-11-22 15:58:06 +00:00
68bbab625a Import VIR_FORCE_CLOSE macro from libvirt
Import the macro for safely closing file descriptors

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:06 +00:00
4f1ea70fd1 Import VIR_ALLOC / VIR_ALLOC_N / VIR_REALLOC_N functions
Import the libvirt memory allocation functions, stripping the OOM
testing and error reporting pieces.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:06 +00:00
ca48db168f Import code annotation macros from libvirt
Import ATTRIBUTE_RETURN_CHECK, ATTRIBUTE_UNUSED &
ATTRIBUTE_NONNULL macros

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:05 +00:00
834ee782d8 Import gnulib's ignore_value macro
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:05 +00:00
c856b7c623 Import gnulib's xalloc_oversized macro
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:05 +00:00
5b5437349a Add decl of MIN macro
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:05 +00:00
e169d3d8cf Import STREQ macro from libvirt
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:58:05 +00:00