mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233)
FossilOrigin-Name: 77b1671351fe94b0ebc126a63140643deae2aa64
This commit is contained in:
10
src/printf.c
10
src/printf.c
@@ -701,7 +701,7 @@ static int vxprintf(
|
||||
}
|
||||
}
|
||||
if( zExtra ){
|
||||
sqliteFree(zExtra);
|
||||
sqlite3_free(zExtra);
|
||||
}
|
||||
}/* End for loop over the format string */
|
||||
return errorflag ? -1 : count;
|
||||
@@ -717,7 +717,7 @@ struct sgMprintf {
|
||||
int nChar; /* Length of the string so far */
|
||||
int nTotal; /* Output size if unconstrained */
|
||||
int nAlloc; /* Amount of space allocated in zText */
|
||||
void *(*xRealloc)(void*,int); /* Function used to realloc memory */
|
||||
void *(*xRealloc)(void*, unsigned int); /* Function used to realloc memory */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -769,7 +769,7 @@ static void mout(void *arg, const char *zNewText, int nNewChar){
|
||||
** the consumer.
|
||||
*/
|
||||
static char *base_vprintf(
|
||||
void *(*xRealloc)(void*,int), /* Routine to realloc memory. May be NULL */
|
||||
void *(*xRealloc)(void*, unsigned int), /* realloc() function. May be NULL */
|
||||
int useInternal, /* Use internal %-conversions if true */
|
||||
char *zInitBuf, /* Initially write here, before mallocing */
|
||||
int nInitBuf, /* Size of zInitBuf[] */
|
||||
@@ -801,8 +801,8 @@ static char *base_vprintf(
|
||||
/*
|
||||
** Realloc that is a real function, not a macro.
|
||||
*/
|
||||
static void *printf_realloc(void *old, int size){
|
||||
return sqlite3_realloc(old,size);
|
||||
static void *printf_realloc(void *old, unsigned int size){
|
||||
return sqlite3_realloc(old, size);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user