[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH RFC 1/9] conf: Modify gendispatch.pl to make ACL argument opaque

On Sat, Feb 11, 2017 at 11:29:37AM -0500, John Ferlan wrote:
> The various drivers each have vir*EnsureACL and vir*CheckACL API's
> which are generated on the fly by gendispatch to include the driver
> typed "def" name as the last argument based on the API being checked
> and the driver name (e.g. Node, Interface, Secrets, etc.).
> Rather than having that name by typed, it's possible to generate the
> API prototype using a "void *opaque" argument and then modify the first
> line of the code to make the typed def argumment based off the opaque
> data. This way we can generalize the ACL typedefs in object parsing
> code to just be an opaque type. The next step in that generalization
> is to remove the multiple typdef's and replace it with one general
> typedef in order to further generalize the various drivers object
> and object list handling functions.

I'm really not a fan of throwing away type safety like this.

I'm not sure how the code will even build after applying this patch
since you've only changed the typedef and not any of the implementations

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]