apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@covalent.net>
Subject Re: cvs commit: apr/misc/win32 apr_app.c
Date Tue, 29 Jan 2002 19:56:37 GMT
From: "Greg Stein" <gstein@lyra.org>
Sent: Tuesday, January 29, 2002 1:43 PM


> On Tue, Jan 29, 2002 at 06:27:19AM -0000, wrowe@apache.org wrote:
> >...
> >   extern int main(int argc, char **argv, char **env);
> >   
> >   static int wastrtoastr(char ***retarr, int args, wchar_t **arr)
> >   {
> >       size_t elesize = 0;
> >       char **newarr;
> >       char *elements;
> 
> Should 'const' be used more throughout this code?

Well the new elements certainly aren't const until we have constructed them :)


> >       char *ele;
> >       int arg;
> >   
> >       if (args < 0) {
> >           for (args = 0; arr[args]; ++args)
> >               ;
> >       }
> >   
> >       newarr = malloc(arg * sizeof(char *));
> 
> Since this is Win32 specific code, is there a benefit to using Win32
> allocation routines?

As you will note in a later patch - we had to and I've done so (using the
clib code) because of internal consistency checks.  =-/

Bill


Mime
View raw message