Re: HTTPMSGLOCK/UNLOCK

From: Duane Wessels <wessels@dont-contact.us>
Date: Tue, 2 May 2006 10:26:58 -0600 (MDT)

On Sat, 29 Apr 2006, Robert Collins wrote:

> I'm unclear why we have these macros rather than smart pointers...
>
> having these macros as a pattern means we'll need to learn LOCK/UNLOCK
> macros for every class that is in use.

I tried and found it very difficult. Perhaps you can do better.

Heres the reasons I gave Henrik back in March:

         You can reference a Foo* without including Foo.h, but
         Foo::Pointer requires including Foo.h (and its dependencies).

         ::Pointer doesn't work for derived classes. For example,
         HttpMsg is a base class for HttpRequest and HttpReply and
         you can pass an HttpRequest* to a function that has HttpMsg*
         as a parameter. But it doesn't work with HttpMsg::Pointer.
         To get around it you have to use the getRaw() hack.

         These are of course solvable, but annoying. Its been too
         long for me to remember exactly the "straw that broke the
         camel's back" when I tried converting to ::Pointer.

Duane W.
Received on Tue May 02 2006 - 10:26:59 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:04 MDT