[libvirt] [libvirt-php PATCH 0/7] add bindings for NWFilter APIs

Michal Privoznik mprivozn at redhat.com
Sat Jun 24 17:16:47 UTC 2017


On 06/24/2017 06:52 PM, Neal Gompa wrote:
> On Fri, Jun 23, 2017 at 4:58 AM, Michal Privoznik <mprivozn at redhat.com> wrote:
>>
>> But this got me thinking, should we follow libvirt's example and finally
>> split src/libvirt-php.c into smaller files that would handle just one
>> object? For example:
>>
>> libvirt-domain.c
>> libvirt-nwfilter.c
>> libvirt-storage.c
>> libvirt-network.c
>>
>> and so on.
> 
> If this isn't too difficult to do, I think it'd be a good idea. The
> massive src/libvirt-php.c is difficult to parse and diff between
> releases. Breaking it up into separate logical files would make diffs
> cleaner, and also probably make it easier to centralize the
> abstractions between different PHP versions as support for them is
> added.
> 
> 

Exactly. And if we ever want to have configure options to deliberately
disable some 'modules' (e.g. I want my php bindings without support for
say networks), we can just not compile that file in. It's doubtful that
somebody will ever need this though. Perhaps when they are running
libvirt without the corresponding module enabled too?

Michal




More information about the libvir-list mailing list