Re: [Libevent-users] Access struct event callback argument

2008-12-12 Thread Nick Mathewson
On Fri, Dec 12, 2008 at 08:54:03PM -0200, Rodrigo Campos wrote:
 On Wed, Dec 3, 2008 at 5:15 PM, Rodrigo Campos rodrig...@gmail.com wrote:
  On Wed, Dec 3, 2008 at 4:46 PM, Niels Provos pro...@gmail.com wrote:
  On Wed, Dec 3, 2008 at 10:28 AM, Rodrigo Campos rodrig...@gmail.com 
  wrote:
  I wanted to know how public is the struct event defined in event.h.
  I mean, is it part of the interface/api ?
 
  We are moving away from making structures accessible.   If you want to
  change the call back argument, you could delete the event and re set
  it.
 
  I dont want to change it. I want to free it :)
 
 
 Sorry to ask again, but if you are moving away from making structures
 accessible, do you plan to provide some funtion to get them ? (I'm
 particulary intrested in the ev_arg)
 

So, here's the plan.  In libevent 2.0, we're splitting most headers
into three separate headers, and keeping the old header names for
backward compatibility.

   For example, if you #include event.h, you'll get all the
   functions and structures that you get now, and most of your code
   should still work.

   If you include event2/event.h, you'll only get the non-deprecated
   functions.

   If you include event2/event_compat.h, you get the deprecated
   functions for backward compatibility.

   If you include event2/event_struct.h, you also get the structure
   declarations.  If you do this, we explicitly disclaim promises of
   forward-compatibility: structure layout will not change
   gratuitously, but it is likely to change between versions.


If there's something that you need to get at, or free, or whatever,
and you need to be forward-compatible about it, the right solution is
probably to participate in libevent development, and make sure that
there is a function declared in event2/event.h (for example) to access
whatever the field is.

yrs,
-- 
Nick
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users


Re: [Libevent-users] Access struct event callback argument

2008-12-12 Thread Rodrigo Campos
On Fri, Dec 12, 2008 at 9:02 PM, Nick Mathewson ni...@freehaven.net wrote:
 On Fri, Dec 12, 2008 at 08:54:03PM -0200, Rodrigo Campos wrote:
 On Wed, Dec 3, 2008 at 5:15 PM, Rodrigo Campos rodrig...@gmail.com wrote:
  On Wed, Dec 3, 2008 at 4:46 PM, Niels Provos pro...@gmail.com wrote:
  On Wed, Dec 3, 2008 at 10:28 AM, Rodrigo Campos rodrig...@gmail.com 
  wrote:
  I wanted to know how public is the struct event defined in event.h.
  I mean, is it part of the interface/api ?
 
  We are moving away from making structures accessible.   If you want to
  change the call back argument, you could delete the event and re set
  it.
 
  I dont want to change it. I want to free it :)


 Sorry to ask again, but if you are moving away from making structures
 accessible, do you plan to provide some funtion to get them ? (I'm
 particulary intrested in the ev_arg)



 If there's something that you need to get at, or free, or whatever,
 and you need to be forward-compatible about it, the right solution is
 probably to participate in libevent development, and make sure that
 there is a function declared in event2/event.h (for example) to access
 whatever the field is.

Ok, if we need it I will submit a patch :)


Thanks a lot for the explanation.


Rodrigo
___
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users