summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/config.w32.h2
-rw-r--r--main/main.c12
2 files changed, 6 insertions, 8 deletions
diff --git a/main/config.w32.h b/main/config.w32.h
index 1c08814065..5cba103bef 100644
--- a/main/config.w32.h
+++ b/main/config.w32.h
@@ -204,7 +204,7 @@
/* Define if you have the setlocale function. */
#define HAVE_SETLOCALE 1
-#define HAVE_LOCALE_H 1
+#define HAVE_LOCALE_H
/* Define if you have the setvbuf function. */
#ifndef HAVE_BINDLIB
diff --git a/main/main.c b/main/main.c
index 59d1a54b37..6e801350d0 100644
--- a/main/main.c
+++ b/main/main.c
@@ -426,20 +426,18 @@ PHPAPI void php3_error(int type, const char *format,...)
}
}
if (PG(track_errors)) {
- pval *tmp;
+ pval tmp;
va_start(args, format);
size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
va_end(args);
buffer[sizeof(buffer) - 1] = 0;
- tmp = (pval *)emalloc(sizeof(pval));
- INIT_PZVAL(tmp);
- tmp->value.str.val = (char *) estrndup(buffer, size);
- tmp->value.str.len = size;
- tmp->type = IS_STRING;
+ tmp.value.str.val = (char *) estrndup(buffer, size);
+ tmp.value.str.len = size;
+ tmp.type = IS_STRING;
- _php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(pval *), NULL);
+ _php3_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void *) & tmp, sizeof(pval), NULL);
}
switch (type) {