All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: hail-devel@vger.kernel.org
Subject: Re: [tabled patch] abstract out TCP-write code
Date: Thu, 23 Sep 2010 19:51:18 -0400	[thread overview]
Message-ID: <4C9BE7F6.7010301@garzik.org> (raw)
In-Reply-To: <20100922203741.48a2b8e6@lembas.zaitcev.lan>

On 09/22/2010 10:37 PM, Pete Zaitcev wrote:
> On Wed, 22 Sep 2010 21:26:13 -0400
> Jeff Garzik<jeff@garzik.org>  wrote:
>> It is a common idiom even in GLib that callbacks receive two anonymous
>> pointers; witness the data type GFunc's 'data' and 'user_data'
>> arguments:
>> http://library.gnome.org/devel/glib/stable/glib-Doubly-Linked-Lists.html#GFunc
>
> There's a lot of retarged garbage in Glib, just look at their lists.
> If someone smarter wrote Glib, we would not need struct list_head.

I use both list types, because there's a use case for both.  You don't 
always have the luxury of having a struct in which to embed data+next 
pointers.  Allocated strings are an excellent example.

GFunc has two parameters for a reason :)  See for example 
http://library.gnome.org/devel/glib/stable/glib-Doubly-Linked-Lists.html#g-list-foreach

It really is a common idiom, based on a common need, not just my style 
preference.  :)

	Jeff


  parent reply	other threads:[~2010-09-23 23:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23  0:09 [tabled patch] abstract out TCP-write code Jeff Garzik
2010-09-23  0:28 ` Pete Zaitcev
2010-09-23  1:26   ` Jeff Garzik
2010-09-23  2:37     ` Pete Zaitcev
2010-09-23  4:32       ` Jeff Garzik
2010-09-23 13:57         ` Pete Zaitcev
2010-09-23 15:28           ` Jim Meyering
2010-09-23 23:48             ` Jeff Garzik
2010-09-23 16:47           ` Jeff Garzik
2010-09-23 23:51       ` Jeff Garzik [this message]
2010-09-23 21:09 ` [tabled patch v2] " Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9BE7F6.7010301@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.