[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Compressed text-base patch

From: Eric Dorland <eric.dorland_at_mail.mcgill.ca>
Date: 2003-04-29 00:31:16 CEST

* rbb@rkbloom.net (rbb@rkbloom.net) wrote:
>
> > > As to why your commits fail, the problem is your use of
> > > apr_file_data_get/apr_file_data_set. I do not know whether your
> > > expectations are wrong, or whether the APR implementation is wrong,
> > > but it appears that the data gets associated with the pool used by the
> > > file, rather than with the file itself. This causes problems when two
> > > files use the same pool.
> >
> > Yes I figured that out last night myself :) I think it's APR that's in
> > the wrong here, since you would except the data to be associated with
> > the file handle, not it's memory pool. Are there any APR developers
> > on the list who think I'm wrong?
>
> <rbb raises hand>
>
> APR has called this out from the get-go. The data is associated with
> whatever pool is used to open the file. The user-data stuff is an aspect
> of pools, not every APR type. If we tried to associate the data with the
> specific file handle, we would need a hash-table in every APR type, as
> well as one in the pool. You must name your key so that it won't
> interfere with other keys in the pool. This used to be very clearly
> documented, but I haven't touched that code in well over a year, so I
> don't know if it still is or not.

Well let me say that's really stupid :-P

Yeah, the docs for the file functions really don't make this
clear, and from the name of the function I think my assumption would
be the one most people would make. How many data structures do this
besides apr_file_t? Is this behavior desired, or would you rather have
the data associated with the actual object?

-- 
Eric Dorland <eric.dorland@mail.mcgill.ca>
ICQ: #61138586, Jabber: hooty@jabber.com
1024D/16D970C6 097C 4861 9934 27A0 8E1C  2B0A 61E9 8ECF 16D9 70C6
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s++: a-- C+++ UL+++ P++ L++ E++ W++ N+ o K- w+ 
O? M++ V-- PS+ PE Y+ PGP++ t++ 5++ X+ R tv++ b+++ DI+ D+ 
G e h! r- y+ 
------END GEEK CODE BLOCK------

  • application/pgp-signature attachment: stored
Received on Tue Apr 29 00:32:03 2003

This is an archived mail posted to the Subversion Dev mailing list.