[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: cvs commit: apr/misc/win32 apr_app.c
From:       "William A. Rowe, Jr." <wrowe () covalent ! net>
Date:       2002-01-29 19:56:37
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic