warning C4232: nonstandard extension used : 'pcre_malloc' : address of

dllimport 'malloc' is not static, identity not guaranteed
This commit is contained in:
Glenn Maynard
2006-11-19 19:52:27 +00:00
parent 4d760bd02d
commit 54de64a524
2 changed files with 7 additions and 10 deletions
+2 -5
View File
@@ -365,11 +365,6 @@ extern "C"
int (*pcre_callout)(pcre_callout_block *) = NULL;
}
#else
void *(*pcre_malloc)(size_t) = malloc;
void (*pcre_free)(void *) = free;
void *(*pcre_stack_malloc)(size_t) = malloc;
void (*pcre_stack_free)(void *) = free;
int (*pcre_callout)(pcre_callout_block *) = NULL;
#endif
#endif
@@ -5898,6 +5893,7 @@ for (;;)
function is able to force a failure. */
case OP_CALLOUT:
#if 0
if (pcre_callout != NULL)
{
pcre_callout_block cb;
@@ -5914,6 +5910,7 @@ for (;;)
if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH);
if (rrc < 0) RRETURN(rrc);
}
#endif
ecode += 2;
break;
+5 -5
View File
@@ -146,11 +146,11 @@ it is null on other OS. For Virtual Pascal, these have to be different again.
*/
#ifndef VPCOMPAT
PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
PCRE_DATA_SCOPE void (*pcre_free)(void *);
PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t);
PCRE_DATA_SCOPE void (*pcre_stack_free)(void *);
PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
#define pcre_malloc malloc
#define pcre_free free
#define pcre_stack_malloc malloc
#define pcre_stack_free free
#define pcre_callout NULL
#else /* VPCOMPAT */
extern void *pcre_malloc(size_t);
extern void pcre_free(void *);