use macro for replace malloc api (see skynet_malloc.h)

This commit is contained in:
Cloud Wu
2014-04-18 22:35:47 +08:00
parent 23cfb11954
commit 7d835d222b
23 changed files with 125 additions and 68 deletions

View File

@@ -29,7 +29,7 @@ skynet_error(struct skynet_context * context, const char *msg, ...) {
int len = vsnprintf(tmp, LOG_MESSAGE_SIZE, msg, ap);
va_end(ap);
if (len < LOG_MESSAGE_SIZE) {
data = strdup(tmp);
data = skynet_strdup(tmp);
} else {
int max_size = LOG_MESSAGE_SIZE;
for (;;) {