|
|
Choosing A Webhost: |
Re: apr_brigade_pflatten: msg#00268apache.mod-perl.devel
> I don't like this populate-the-argument C interface. me neither. > And we already do > that in several places. But for 2 arguments? That's too much and > inconsistent with other similar interfaces. I think pflatten should be > similar to $r->read(), i.e. populate the buffer $data, but return the > number of bytes it has read. that probably makes more sense. but it makes it dissimilar from flatten() which returns both the data and length as well. > with your implementation $rc is useless > anyway. well, not useless - if it's not APR::SUCCESS then you know not to use the returned information > It should return -1 on error and 0 or more as a number of bytes > populated in $data. I prefer undef to -1 in a perl interface. > returning the length as I've suggested will remove the need for this > questionable snippet. I'd croak otherwise and not silently continue. as we've already discussed, I may have a problem with croak. but I'm thinking on it. > > There is one more thing to handle: the case when the brigade is empty. > When this happens we need to put undef in the perl buffer. See the > RequestIO read implementation. This is needed in both flatten functions. yup. --Geoff
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: apr_brigade_pflatten, Stas Bekman |
|---|---|
| Next by Date: | Re: cvs commit: modperl-2.0 Changes, Stas Bekman |
| Previous by Thread: | Re: apr_brigade_pflatten, Stas Bekman |
| Next by Thread: | Re: apr_brigade_pflatten, Stas Bekman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |