On Mon, May 28, 2018 at 01:04:28PM +0530, Sukrit Bhatnagar wrote:
> On 25 May 2018 at 16:20, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
> >> On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
> >> > On Fri, May 25, 2018 at 09:13:51AM +0200,
On Mon, May 28, 2018 at 09:40:41PM +0530, Sukrit Bhatnagar wrote:
> On 28 May 2018 at 13:54, Pavel Hrdina wrote:
> > On Mon, May 28, 2018 at 01:04:28PM +0530, Sukrit Bhatnagar wrote:
> >> On 25 May 2018 at 16:20, Pavel Hrdina wrote:
> >> > On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea
On 29 May 2018 at 10:36, Michal Privoznik wrote:
> On 05/28/2018 09:34 AM, Sukrit Bhatnagar wrote:
>>
>> This is what new macros will look like:
>>
>> # define _VIR_TYPE_PTR(type) type##Ptr
>>
>> # define _VIR_ATTR_AUTOFREE_PTR(type) __attribute__((cleanup(type##Free)))
>> # define
On 05/28/2018 09:34 AM, Sukrit Bhatnagar wrote:
>
> This is what new macros will look like:
>
> # define _VIR_TYPE_PTR(type) type##Ptr
>
> # define _VIR_ATTR_AUTOFREE_PTR(type) __attribute__((cleanup(type##Free)))
> # define _VIR_ATTR_AUTOCLOSE_PTR(type) __attribute__((cleanup(type##Close)))
>
On 28 May 2018 at 13:54, Pavel Hrdina wrote:
> On Mon, May 28, 2018 at 01:04:28PM +0530, Sukrit Bhatnagar wrote:
>> On 25 May 2018 at 16:20, Pavel Hrdina wrote:
>> > On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
>> >> On Fri, 2018-05-25
On Mon, May 28, 2018 at 01:04:28PM +0530, Sukrit Bhatnagar wrote:
> On 25 May 2018 at 16:20, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
> >> On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
> >> > On Fri, May 25, 2018 at
On Mon, May 28, 2018 at 01:04:28PM +0530, Sukrit Bhatnagar wrote:
> On 25 May 2018 at 16:20, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
> >> On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
> >> > On Fri, May 25, 2018 at
On 25 May 2018 at 16:20, Pavel Hrdina wrote:
> On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
>> On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
>> > On Fri, May 25, 2018 at 09:13:51AM +0200, Andrea Bolognani wrote:
>> > > However, I realize it might
On Fri, May 25, 2018 at 12:06:50PM +0200, Andrea Bolognani wrote:
> On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 09:13:51AM +0200, Andrea Bolognani wrote:
> > > However, I realize it might not be possible to register free
> > > functions for a native type
On Fri, 2018-05-25 at 11:17 +0200, Erik Skultety wrote:
> I also like the alternative approach Andrea mentioned, especially since you
> can reuse it for structures using plain scalar types, e.g. a structure like
>
> typedef _virSomething virSomething;
> typedef virSomething * virSomethingPtr;
>
On Fri, 2018-05-25 at 10:04 +0200, Pavel Hrdina wrote:
> On Fri, May 25, 2018 at 09:13:51AM +0200, Andrea Bolognani wrote:
> > However, I realize it might not be possible to register free
> > functions for a native type without having to introduce something
> > like
> >
> > typedef char *
On Fri, May 25, 2018 at 11:03:01AM +0200, Andrea Bolognani wrote:
> On Fri, 2018-05-25 at 10:46 +0200, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 10:32:04AM +0200, Andrea Bolognani wrote:
> > > I'm probably missing something, but couldn't you just have
> > >
> > > #define VIR_AUTOFREE(type)
On Fri, 2018-05-25 at 10:46 +0200, Pavel Hrdina wrote:
> On Fri, May 25, 2018 at 10:32:04AM +0200, Andrea Bolognani wrote:
> > I'm probably missing something, but couldn't you just have
> >
> > #define VIR_AUTOFREE(type) __attribute__((cleanup(virFree))) type
> >
> > which you would then use
On Fri, May 25, 2018 at 10:32:04AM +0200, Andrea Bolognani wrote:
> On Fri, 2018-05-25 at 10:08 +0200, Pavel Hrdina wrote:
> > On Fri, May 25, 2018 at 09:01:03AM +0200, Andrea Bolognani wrote:
> > > On Wed, 2018-05-23 at 18:23 +0200, Peter Krempa wrote:
> > > > On Wed, May 23, 2018 at 18:05:17
On Fri, 2018-05-25 at 10:08 +0200, Pavel Hrdina wrote:
> On Fri, May 25, 2018 at 09:01:03AM +0200, Andrea Bolognani wrote:
> > On Wed, 2018-05-23 at 18:23 +0200, Peter Krempa wrote:
> > > On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote:
> >
> > [...]
> > > > VIR_AUTOFREE char *str =
On Fri, May 25, 2018 at 09:13:51AM +0200, Andrea Bolognani wrote:
> On Wed, 2018-05-23 at 18:05 +0200, Pavel Hrdina wrote:
> > I liked the way how GLib is solving the issue so we can simply use the
> > same approach since it looks reasonable.
> >
> > There would be three different macros that
On Fri, May 25, 2018 at 09:01:03AM +0200, Andrea Bolognani wrote:
> On Wed, 2018-05-23 at 18:23 +0200, Peter Krempa wrote:
> > On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote:
> [...]
> > > VIR_AUTOFREE char *str = NULL;
> >
> > For consistency I'd prefer if the argument is in
On Wed, 2018-05-23 at 18:05 +0200, Pavel Hrdina wrote:
> I liked the way how GLib is solving the issue so we can simply use the
> same approach since it looks reasonable.
>
> There would be three different macros that would be used to annotate
> variable with attribute cleanup:
>
> VIR_AUTOFREE
On Wed, 2018-05-23 at 18:23 +0200, Peter Krempa wrote:
> On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote:
[...]
> > VIR_AUTOFREE char *str = NULL;
>
> For consistency I'd prefer if the argument is in parentheses similarly
> to the ones below.
Seconded.
--
Andrea Bolognani / Red Hat
On Wed, May 23, 2018 at 06:23:01PM +0200, Peter Krempa wrote:
> On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote:
>
> [...]
>
> > I liked the way how GLib is solving the issue so we can simply use the
> > same approach since it looks reasonable.
> >
> > There would be three different
On Thu, May 24, 2018 at 11:16:40PM +0530, Sukrit Bhatnagar wrote:
> On 23 May 2018 at 21:35, Pavel Hrdina wrote:
> > On Sun, Mar 25, 2018 at 01:55:07AM +0530, Sukrit Bhatnagar wrote:
> >> Hi,
> >>
> >> I am interested in implementing the GCC cleanup attribute for automatic
>
On 23 May 2018 at 21:35, Pavel Hrdina wrote:
> On Sun, Mar 25, 2018 at 01:55:07AM +0530, Sukrit Bhatnagar wrote:
>> Hi,
>>
>> I am interested in implementing the GCC cleanup attribute for automatic
>> resource freeing as part of GSoC'18. I have shared a proposal for the same.
On Wed, May 23, 2018 at 18:05:17 +0200, Pavel Hrdina wrote:
[...]
> I liked the way how GLib is solving the issue so we can simply use the
> same approach since it looks reasonable.
>
> There would be three different macros that would be used to annotate
> variable with attribute cleanup:
>
>
On Sun, Mar 25, 2018 at 01:55:07AM +0530, Sukrit Bhatnagar wrote:
> Hi,
>
> I am interested in implementing the GCC cleanup attribute for automatic
> resource freeing as part of GSoC'18. I have shared a proposal for the same.
>
> This mail is to discuss the code design for implementing it.
>
>
On Sun, Mar 25, 2018 at 01:55:07AM +0530, Sukrit Bhatnagar wrote:
> Hi,
>
> I am interested in implementing the GCC cleanup attribute for automatic
> resource freeing as part of GSoC'18. I have shared a proposal for the same.
>
> This mail is to discuss the code design for implementing it.
>
>
Hi,
I am interested in implementing the GCC cleanup attribute for automatic
resource freeing as part of GSoC'18. I have shared a proposal for the same.
This mail is to discuss the code design for implementing it.
Here are some of my ideas:
This attribute requires a cleanup function that is
26 matches
Mail list logo