Stefan,
Am 29.03.2011 23:29, schrieb s...@apache.org:
Author: sf
Date: Tue Mar 29 21:29:34 2011
New Revision: 1086756

URL: http://svn.apache.org/viewvc?rev=1086756&view=rev
Log:
Change the ap_cfg_getline() and ap_cfg_getc() to return an error code.

Also:
- Make ap_cfg_getline() return APR_ENOSPC if a config line is too long.
- Add ap_pcfg_strerror() function to convert ap_cfg_getline's return value
   into a nice message.
- Adjust definition of ap_configfile_t accordingly.

Not bumping MMN because it has already been bumped today.

Modified:
     httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
     httpd/httpd/trunk/include/ap_mmn.h
     httpd/httpd/trunk/include/http_config.h
     httpd/httpd/trunk/modules/lua/mod_lua.c
     httpd/httpd/trunk/server/config.c
     httpd/httpd/trunk/server/util.c
...
  /* Read one character from a configfile_t */
-AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp)
+AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp)
...
I'm not yet convinced that this API change is a good idea ...
we have this API already since httpd 1.3 times:
http://httpd.apache.org/dev/apidoc/apidoc_ap_cfg_getc.html
and a couple of modules may rely on it ...
I think we should only declare the original function as deprecated, and add a new one, f.e.:
AP_DECLARE(apr_status_t) ap_cfg_getchar(char *ch, ap_configfile_t *cfp)

Gün.


Reply via email to