You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/08/09 19:46:26 UTC
cvs commit: apache-2.0/src/lib/apr/include apr_getopt.h
wrowe 00/08/09 10:46:22
Modified: src/lib/apr/misc/unix getopt.c
src/lib/apr/include apr_getopt.h
Log:
Commit two fixes while I'm considering Jeff's comments.
apr_getopt_t->cont is not really necessary, but I don't yet see a reason
to kill it outright. Might come in handy later.
Revision Changes Path
1.20 +1 -0 apache-2.0/src/lib/apr/misc/unix/getopt.c
Index: getopt.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/getopt.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- getopt.c 2000/08/09 14:54:03 1.19
+++ getopt.c 2000/08/09 17:46:21 1.20
@@ -39,6 +39,7 @@
int argc, char const* const* argv)
{
*os = apr_palloc(cont, sizeof(apr_getopt_t));
+ (*os)->cont = cont;
(*os)->err = 1;
(*os)->ind = 1;
(*os)->place = EMSG;
1.16 +2 -2 apache-2.0/src/lib/apr/include/apr_getopt.h
Index: apr_getopt.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_getopt.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apr_getopt.h 2000/08/09 14:54:03 1.15
+++ apr_getopt.h 2000/08/09 17:46:22 1.16
@@ -56,7 +56,7 @@
#define APR_GETOPT_H
typedef struct apr_getopt_t {
- apr_pool_t cont; /* context for processing */
+ apr_pool_t *cont; /* context for processing */
int err; /* if error message should be printed */
int ind; /* index into parent argv vector */
int opt; /* character checked for validity */
@@ -73,7 +73,7 @@
* @param argc The number of arguments to parse
* @param argv The array of arguments to parse
* @tip Arguments 2 and 3 are most commonly argc and argv from main(argc, argv)
- * @deffunc apr_status_t apr_initopt(apr_getopt_t **os, apr_pool_t *cont, int argc, char const* const* argv)
+ * @deffunc apr_status_t apr_initopt(apr_pool_t *cont, apr_getopt_t **os, int argc, char const* const* argv)
*/
APR_EXPORT(apr_status_t) apr_initopt(apr_getopt_t **os, apr_pool_t *cont,
int argc, char const* const* argv);
Re: cvs commit: apache-2.0/src/lib/apr/include apr_getopt.h
Posted by rb...@covalent.net.
On 9 Aug 2000 wrowe@locus.apache.org wrote:
> wrowe 00/08/09 10:46:22
>
> Modified: src/lib/apr/misc/unix getopt.c
> src/lib/apr/include apr_getopt.h
> Log:
> Commit two fixes while I'm considering Jeff's comments.
>
> apr_getopt_t->cont is not really necessary, but I don't yet see a reason
> to kill it outright. Might come in handy later.
Please do not kill apr_getopt_t->cont. Having the context means other
operating systems can allocate memory if they have to. It also makes
apr_getopt fit in with the rest of APR.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: cvs commit: apache-2.0/src/lib/apr/include apr_getopt.h
Posted by rb...@covalent.net.
On 9 Aug 2000 wrowe@locus.apache.org wrote:
> wrowe 00/08/09 10:46:22
>
> Modified: src/lib/apr/misc/unix getopt.c
> src/lib/apr/include apr_getopt.h
> Log:
> Commit two fixes while I'm considering Jeff's comments.
>
> apr_getopt_t->cont is not really necessary, but I don't yet see a reason
> to kill it outright. Might come in handy later.
Please do not kill apr_getopt_t->cont. Having the context means other
operating systems can allocate memory if they have to. It also makes
apr_getopt fit in with the rest of APR.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------