Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r1326980 - /httpd/httpd/trunk/modules/loggers/mod_log_debug.c

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


wrowe at rowe-clan

Apr 17, 2012, 9:48 PM

Post #1 of 2 (259 views)
Permalink
Re: svn commit: r1326980 - /httpd/httpd/trunk/modules/loggers/mod_log_debug.c

Odd... there is no language assurance that these statics remain static
across module reloads. A static var != static fn.

On 4/17/2012 3:07 AM, jorton [at] apache wrote:
> Author: jorton
> Date: Tue Apr 17 08:07:11 2012
> New Revision: 1326980
>
> URL: http://svn.apache.org/viewvc?rev=1326980&view=rev
> Log:
> * modules/loggers/mod_log_debug.c: Mark private globals as static.
>
> Modified:
> httpd/httpd/trunk/modules/loggers/mod_log_debug.c
>
> Modified: httpd/httpd/trunk/modules/loggers/mod_log_debug.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_debug.c?rev=1326980&r1=1326979&r2=1326980&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/loggers/mod_log_debug.c (original)
> +++ httpd/httpd/trunk/modules/loggers/mod_log_debug.c Tue Apr 17 08:07:11 2012
> @@ -35,8 +35,8 @@ typedef struct {
> apr_array_header_t *entries;
> } log_debug_dirconf;
>
> -const char *allhooks = "all";
> -const char * const hooks[] = {
> +static const char *allhooks = "all";
> +static const char * const hooks[] = {
> "log_transaction", /* 0 */
> "quick_handler", /* 1 */
> "handler", /* 2 */
>
>
>


jorton at redhat

Apr 18, 2012, 1:41 AM

Post #2 of 2 (241 views)
Permalink
Re: svn commit: r1326980 - /httpd/httpd/trunk/modules/loggers/mod_log_debug.c [In reply to]

On Tue, Apr 17, 2012 at 11:48:03PM -0500, William Rowe wrote:
> Odd... there is no language assurance that these statics remain static
> across module reloads. A static var != static fn.

I don't know what you mean here, sorry. static/extern for global
variables does have basically the same semantics as functions, it means
private/public to the compilation unit respectively. These variables
should not be public since they lack namespace-safety and are genuinely
private to the module. Am I missing something?

Regards, Joe

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.