Re: [PATCH 01/15] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageAuthDef

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

 



On Thu, Feb 07, 2019 at 05:11:24PM +0100, Andrea Bolognani wrote:
> On Thu, 2019-02-07 at 16:55 +0100, Erik Skultety wrote:
> > On Thu, Feb 07, 2019 at 04:24:13PM +0100, Andrea Bolognani wrote:
> > > Please keep the semicolon! If a macro is used like a function, then
> > > its call sites should also look like those of a function.
> >
> > Except VIR_DEFINE_AUTOPTR_FUNC macro is not used like a function, it defines a
> > function.
>
> Sure, and the way you make that happen is by writing
>
>   MACRO_NAME(argument_one, argument_two);
>
> How is that not using it like a function? :)

I may need to replace my dictionary, because the way I understand the
expression "like a function" is that the macro is called like function and it
behaves like a function, i.e. returns a value, IOW by using the macro its
expansion will perform the usual set of operation on the stack that a function
call involves (push parameters, return address, jump into function,
pop the return value...)

Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux