You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe Jr." <wr...@rowe-clan.net> on 2010/01/20 07:32:54 UTC
Re: svn commit: r899905 - in /apr/apr/trunk: include/ include/arch/unix/
poll/unix/ test/
On 1/16/2010 2:53 AM, minfrin@apache.org wrote:
> /* Private functions */
> -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
> +apr_status_t create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, apr_file_t **wakeup_pipe);
> +apr_status_t close_wakeup_pipe(apr_file_t **wakeup_pipe);
Although these are not exported for dynamic builds, aren't we violating
the principal of least surprise with respect to binding to a static
libapr.a archive?
Re: svn commit: r899905 - in /apr/apr/trunk: include/
include/arch/unix/ poll/unix/ test/
Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Jan 21, 2010 at 6:49 PM, Neil Conway <nr...@cs.berkeley.edu> wrote:
> On Thu, Jan 21, 2010 at 3:46 PM, Graham Leggett <mi...@sharp.fm> wrote:
>> You move them back to the source module where they originated? :)
>>
>> I see some refactoring was done, perhaps in hindsight this refactoring
>> should be re-looked at.
>
> I don't see why: apr_pollset_wakeup() already used a "private"
> function that was called from several different source files
> (apr_pollset_drain_wakeup_pipe()). The apr_pollcb_wakeup() patch
> simply adds two more APR-internal functions, and moves the definition
> of all 3 functions to a separate source file.
>
> Neil
>
Agreed...
When apr_pollset_drain_wakeup_pipe() started being used from multiple
source files (for both pollcb_* and pollset_*), it did make sense to
move the implementation to a poll flavor-agnostic location (the new
wakeup.c) but it wasn't valid to drop the apr_ prefix (namespace
protection). So we have to add that back. And the two new helper
functions also need the apr_prefix.
Committing shortly...
Re: svn commit: r899905 - in /apr/apr/trunk: include/
include/arch/unix/ poll/unix/ test/
Posted by Neil Conway <nr...@cs.berkeley.edu>.
On Thu, Jan 21, 2010 at 3:46 PM, Graham Leggett <mi...@sharp.fm> wrote:
> You move them back to the source module where they originated? :)
>
> I see some refactoring was done, perhaps in hindsight this refactoring
> should be re-looked at.
I don't see why: apr_pollset_wakeup() already used a "private"
function that was called from several different source files
(apr_pollset_drain_wakeup_pipe()). The apr_pollcb_wakeup() patch
simply adds two more APR-internal functions, and moves the definition
of all 3 functions to a separate source file.
Neil
Re: svn commit: r899905 - in /apr/apr/trunk: include/ include/arch/unix/ poll/unix/ test/
Posted by Graham Leggett <mi...@sharp.fm>.
On 21 Jan 2010, at 7:58 PM, William A. Rowe Jr. wrote:
>> (Was waiting for Neil to respond). Is it enough to declare these as
>> static? I would imagine this was an oversight.
>
> How do you declare them static when living in another source module?
You move them back to the source module where they originated? :)
I see some refactoring was done, perhaps in hindsight this refactoring
should be re-looked at.
Regards,
Graham
--
Re: svn commit: r899905 - in /apr/apr/trunk: include/ include/arch/unix/
poll/unix/ test/
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 1/21/2010 4:47 AM, Graham Leggett wrote:
> On 20 Jan 2010, at 8:32 AM, William A. Rowe Jr. wrote:
>
>>> /* Private functions */
>>> -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
>>> +apr_status_t create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
>>> apr_file_t **wakeup_pipe);
>>> +apr_status_t close_wakeup_pipe(apr_file_t **wakeup_pipe);
>>
>> Although these are not exported for dynamic builds, aren't we violating
>> the principal of least surprise with respect to binding to a static
>> libapr.a archive?
>
> (Was waiting for Neil to respond). Is it enough to declare these as
> static? I would imagine this was an oversight.
How do you declare them static when living in another source module?
Re: svn commit: r899905 - in /apr/apr/trunk: include/
include/arch/unix/ poll/unix/ test/
Posted by Neil Conway <nr...@cs.berkeley.edu>.
The functions can't be static, because they are referenced from > 1 source file.
Attached is a patch that adds apr_pollset prefixes for the private functions.
Neil
On Thu, Jan 21, 2010 at 2:47 AM, Graham Leggett <mi...@sharp.fm> wrote:
> On 20 Jan 2010, at 8:32 AM, William A. Rowe Jr. wrote:
>
>>> /* Private functions */
>>> -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
>>> +apr_status_t create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
>>> apr_file_t **wakeup_pipe);
>>> +apr_status_t close_wakeup_pipe(apr_file_t **wakeup_pipe);
>>
>> Although these are not exported for dynamic builds, aren't we violating
>> the principal of least surprise with respect to binding to a static
>> libapr.a archive?
>
> (Was waiting for Neil to respond). Is it enough to declare these as static?
> I would imagine this was an oversight.
>
> Regards,
> Graham
> --
>
>
Re: svn commit: r899905 - in /apr/apr/trunk: include/ include/arch/unix/ poll/unix/ test/
Posted by Graham Leggett <mi...@sharp.fm>.
On 20 Jan 2010, at 8:32 AM, William A. Rowe Jr. wrote:
>> /* Private functions */
>> -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
>> +apr_status_t create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t
>> *pfd, apr_file_t **wakeup_pipe);
>> +apr_status_t close_wakeup_pipe(apr_file_t **wakeup_pipe);
>
> Although these are not exported for dynamic builds, aren't we
> violating
> the principal of least surprise with respect to binding to a static
> libapr.a archive?
(Was waiting for Neil to respond). Is it enough to declare these as
static? I would imagine this was an oversight.
Regards,
Graham
--
Re: svn commit: r899905 - in /apr/apr/trunk: include/
include/arch/unix/ poll/unix/ test/
Posted by Paul Querna <pa...@querna.org>.
On Tue, Jan 19, 2010 at 10:32 PM, William A. Rowe Jr.
<wr...@rowe-clan.net> wrote:
> On 1/16/2010 2:53 AM, minfrin@apache.org wrote:
>
>> /* Private functions */
>> -void apr_pollset_drain_wakeup_pipe(apr_pollset_t *pollset);
>> +apr_status_t create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, apr_file_t **wakeup_pipe);
>> +apr_status_t close_wakeup_pipe(apr_file_t **wakeup_pipe);
>
> Although these are not exported for dynamic builds, aren't we violating
> the principal of least surprise with respect to binding to a static
> libapr.a archive?
All non-static functions and symbols must have an apr_ prefix.