Branch: Tag:

2003-07-30

2003-07-30 20:29:27 by Martin Stjernholm <mast@lysator.liu.se>

Removed 'void **' in the prototype for wide_string_to_svalue_inumber to
avoid invalid type aliasing. There's no generic pointer-to-pointer in C; we
either know exactly what the type being pointed to is or else it's a void *
- there's nothing in between. C.f. question 4.9 in the C FAQ.

Rev: src/stralloc.c:1.157
Rev: src/stralloc.h:1.78

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: stralloc.c,v 1.156 2003/05/15 15:33:31 mast Exp $ + || $Id: stralloc.c,v 1.157 2003/07/30 20:29:27 mast Exp $   */      #include "global.h"
24:   #include <ctype.h>   #include <math.h>    - RCSID("$Id: stralloc.c,v 1.156 2003/05/15 15:33:31 mast Exp $"); + RCSID("$Id: stralloc.c,v 1.157 2003/07/30 20:29:27 mast Exp $");      /* #define STRALLOC_USE_PRIMES */   
2301:      PMOD_EXPORT int wide_string_to_svalue_inumber(struct svalue *r,    void * str, -  void **ptr, +  void *ptr,    int base,    ptrdiff_t maxlength,    int shift)
2312:    &tmp,    base,    maxlength); -  if(ptr) *ptr=(char *)tmp.ptr; +  if(ptr) *(p_wchar0 **)ptr=tmp.ptr;    return ret;   }