On Thu, 2017-08-03 at 17:02 +0200, Michal Privoznik wrote:
On 08/03/2017 04:58 PM, Dawid Zamirski wrote:
>
> On Thu, 2017-08-03 at 14:27 +0200, Michal Privoznik wrote:
> > On 08/01/2017 11:46 PM, Dawid Zamirski wrote:
> > > * add libvirt-connection.h and libvirt-connection.c
> > > * move all libvirt_connect_* function declarations and
> > > definitions
> > > to
> > > above files
> > > * other minor adjusments to libvirt-php.h and util.h to keep
> > > the
> > > code
> > > compilable while the code is being moved around.
> > > ---
> > > src/Makefile.am | 3 +-
> > > src/libvirt-connection.c | 885
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > > src/libvirt-connection.h | 83 +++++
> > > src/libvirt-php.c | 919 +----------------------------
> > > ----
> > > --------------
> > > src/libvirt-php.h | 104 +++---
> > > src/util.h | 7 -
> > > 6 files changed, 1024 insertions(+), 977 deletions(-)
> > > create mode 100644 src/libvirt-connection.c
> > > create mode 100644 src/libvirt-connection.h
> >
> > Unfortunately, this breaks the build for me. I'm compiling with
> > php5.6.
> > Moreover, as I try to fix the build I wonder if we can put all
> > the
> > php
> > differentiating code into util.h - it'd need to include php.h
> > then
> > (for
> > all those ZEND_* macros and zend_* types).
> >
> > I'm pushing patches 02 and 03 meanwhile.
> >
> > Michal
>
> Sure, I'll do that - it will get rid of the circular dependency
> between
> libvirt-php.h and util.h which I didn't like too much anyway. I'll
> also
> re-test everything on PHP 5 before sending v2.
Oh cool. I didn't expect you to care that much :-) Feel free to
arrange
headers whatever you like and whatever works. It's more important to
split the libvirt-php.c than anything. Thanks!
Michal
Yep ;-) ... and that's precisely why PHP 5.x does not compile util.h
typdefs long to zend_long for PHP < 7, libvirt-php.h uses zend_long but
does not include util.h - so yeah it wasn't quite circular dependency
but still a mess.
Dawid