libvirt/scripts
Daniel P. Berrangé 61fdc96706 scripts: emit raw enum value in API build description
Currently the value for an enum is only emitted if it is a plain
string. If the enum is an integer or hex value, or a complex code block,
it is omitted from the API build. This fixes that by emitting the raw
value if no string value is present.

With this change:

  <macro name='LIBVIR_CHECK_VERSION'
         file='libvirt-common'
         params='major,minor,micro'>
  <macro name='LIBVIR_VERSION_NUMBER'
         file='libvirt-common'>
  <macro name='VIR_COPY_CPUMAP'
         file='libvirt-domain'
         params='cpumaps,maplen,vcpu,cpumap'>
  ...snip...

  <macro name='LIBVIR_CHECK_VERSION'
         file='libvirt-common'
         params='major,minor,micro'
         raw='((major) * 1000000 + (minor) * 1000 + (micro) <= LIBVIR_VERSION_NUMBER)'>
  <macro name='LIBVIR_VERSION_NUMBER'
         file='libvirt-common'
         raw='6004000'>
  <macro name='VIR_COPY_CPUMAP'
         file='libvirt-domain'
         params='cpumaps,maplen,vcpu,cpumap'
         raw='memcpy(cpumap, VIR_GET_CPUMAP(cpumaps, maplen, vcpu), maplen)'>
  ...snip...

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-05-22 11:32:55 +01:00
..
apibuild.py scripts: emit raw enum value in API build description 2020-05-22 11:32:55 +01:00
augeas-gentest.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-aclperms.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-aclrules.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-driverimpls.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-drivername.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-file-access.py tests: rewrite file access checker in Python 2019-12-20 14:23:39 +00:00
check-remote-protocol.py scripts: ignore remote protocol checks if pdwtags crashes 2019-12-06 17:25:23 +00:00
check-symfile.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
check-symsorting.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
cocci-macro-file.h scripts: introduce a macro file for coccinelle 2019-10-21 12:51:54 +02:00
dtrace2systemtap.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
esx_vi_generator.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
genaclperms.py docs: rewrite polkit docs generator in Python 2019-12-20 14:23:40 +00:00
genpolkit.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
gensystemtap.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
group-qemu-caps.py tests: rewrite qemu capability grouper in Python 2019-12-20 14:23:39 +00:00
header-ifdef.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
hvsupport.py docs: rewrite hvsupport.html page generator in python 2019-12-20 14:23:39 +00:00
hyperv_wmi_generator.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
minimize-po.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
mock-noinline.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
prohibit-duplicate-header.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
reformat-news.py build: only support python3 binary 2019-12-04 13:13:01 +00:00
test-wrap-argv.py tests: rewrite test argv line wrapper in Python 2019-12-04 13:44:15 +00:00