[libvirt] [libvirt-php PATCH v2 00/11] Refactor into smaller components

Michal Privoznik mprivozn at redhat.com
Mon Aug 28 13:38:11 UTC 2017


On 08/03/2017 08:34 PM, Dawid Zamirski wrote:
> As per [1], this patch series splits up the large libvirt-php.c into
> components that (attempts) to resemble the structure of the libvirt
> project. Each patch successive patch was compile-tested while the whole
> series was verified with "make check" and a simple custom written PHP
> script.
> 
> 
> Changes from v1 [2]:
>  * rebase on master
>  * include PHP headers in util.h instead of libvirt-php.h this makes
>    header inter-dependencies easier to manage/understand
>  * also test each patch on PHP 5
>  
> [1] https://www.redhat.com/archives/libvir-list/2017-June/msg00991.html
> [2] https://www.redhat.com/archives/libvir-list/2017-August/msg00046.html
> 
> Dawid Zamirski (11):
>   Move PHP version compat macros to utils.h
>   Split up the bindings for libvirt connection API
>   Split up the bindings for libvirt node API
>   Split up the bindings for libvirt stream API
>   Split up the bindings for libvirt domain API
>   Split up the bindings for libvirt network API
>   Split up the bindings for libvirt storage API
>   Split up the bindings for libvirt snapshot API
>   Split up the bindings for libvirt nodedev API
>   Split up the bindings for libvirt NWFilter API
>   Fix is_local_connection implementation.
> 
>  src/Makefile.am          |   11 +-
>  src/libvirt-connection.c |  886 +++++
>  src/libvirt-connection.h |   81 +
>  src/libvirt-domain.c     | 3344 +++++++++++++++++
>  src/libvirt-domain.h     |  208 ++
>  src/libvirt-network.c    |  587 +++
>  src/libvirt-network.h    |   73 +
>  src/libvirt-node.c       |  305 ++
>  src/libvirt-node.h       |   23 +
>  src/libvirt-nodedev.c    |  340 ++
>  src/libvirt-nodedev.h    |   54 +
>  src/libvirt-nwfilter.c   |  415 +++
>  src/libvirt-nwfilter.h   |   66 +
>  src/libvirt-php.c        | 9277 ++++------------------------------------------
>  src/libvirt-php.h        |  496 +--
>  src/libvirt-snapshot.c   |  244 ++
>  src/libvirt-snapshot.h   |   58 +
>  src/libvirt-storage.c    | 1130 ++++++
>  src/libvirt-storage.h    |  137 +
>  src/libvirt-stream.c     |  230 ++
>  src/libvirt-stream.h     |   39 +
>  src/util.h               |  200 +-
>  22 files changed, 9282 insertions(+), 8922 deletions(-)
>  create mode 100644 src/libvirt-connection.c
>  create mode 100644 src/libvirt-connection.h
>  create mode 100644 src/libvirt-domain.c
>  create mode 100644 src/libvirt-domain.h
>  create mode 100644 src/libvirt-network.c
>  create mode 100644 src/libvirt-network.h
>  create mode 100644 src/libvirt-node.c
>  create mode 100644 src/libvirt-node.h
>  create mode 100644 src/libvirt-nodedev.c
>  create mode 100644 src/libvirt-nodedev.h
>  create mode 100644 src/libvirt-nwfilter.c
>  create mode 100644 src/libvirt-nwfilter.h
>  create mode 100644 src/libvirt-snapshot.c
>  create mode 100644 src/libvirt-snapshot.h
>  create mode 100644 src/libvirt-storage.c
>  create mode 100644 src/libvirt-storage.h
>  create mode 100644 src/libvirt-stream.c
>  create mode 100644 src/libvirt-stream.h
> 

ACKed and pushed. Thank you for the hard work!

I've also fixed couple of places, e.g. some patches were not adding
files in order in src/Makefile.am. But nothing serious. Also, I trust
you that you haven't changed the functions, I'm too lazy to check that
(speaking of which, is there an easy way of doing it?).

I wonder if we should move those ZEND_BEGIN_ARG_INFO_EX() lines into the
respective files too. What do you guys think?

Michal




More information about the libvir-list mailing list