Changed mallocMagic() argument to size_t. However, this is probably
not useful so long as Tcl_Alloc() has (unsigned int) for an argument. The more important investigation is probably to determine if there is a way to keep csa2_list from growing to absurdly large sizes on connectivity checks.
This commit is contained in:
parent
b5e06455c5
commit
688f07d302
|
|
@ -92,7 +92,7 @@ static char *freeDelayedItem = NULL;
|
||||||
|
|
||||||
void *
|
void *
|
||||||
mallocMagic(nbytes)
|
mallocMagic(nbytes)
|
||||||
unsigned int nbytes;
|
size_t nbytes;
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
|
|
||||||
|
|
@ -150,12 +150,12 @@ freeMagic(cp)
|
||||||
|
|
||||||
void *
|
void *
|
||||||
callocMagic(nbytes)
|
callocMagic(nbytes)
|
||||||
unsigned int nbytes;
|
size_t nbytes;
|
||||||
{
|
{
|
||||||
void *cp;
|
void *cp;
|
||||||
|
|
||||||
cp = mallocMagic(nbytes);
|
cp = mallocMagic(nbytes);
|
||||||
bzero(cp, (int) nbytes);
|
bzero(cp, (size_t) nbytes);
|
||||||
|
|
||||||
return (cp);
|
return (cp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@
|
||||||
#ifndef _MALLOC_H
|
#ifndef _MALLOC_H
|
||||||
#define _MALLOC_H
|
#define _MALLOC_H
|
||||||
|
|
||||||
extern void *mallocMagic(unsigned int);
|
extern void *mallocMagic(size_t);
|
||||||
extern void *callocMagic(unsigned int);
|
extern void *callocMagic(size_t);
|
||||||
extern void freeMagic(void *);
|
extern void freeMagic(void *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue