[pypy-svn] r24985 - pypy/branch/explicit-exceptions/translator/c/src
cfbolz at codespeak.net
cfbolz at codespeak.net
Sat Mar 25 00:30:10 CET 2006
Author: cfbolz
Date: Sat Mar 25 00:29:59 2006
New Revision: 24985
Modified:
pypy/branch/explicit-exceptions/translator/c/src/mem.h
Log:
ouch. it is not a good idea to forget the braces there
Modified: pypy/branch/explicit-exceptions/translator/c/src/mem.h
==============================================================================
--- pypy/branch/explicit-exceptions/translator/c/src/mem.h (original)
+++ pypy/branch/explicit-exceptions/translator/c/src/mem.h Sat Mar 25 00:29:59 2006
@@ -69,7 +69,7 @@
#define OP_BOEHM_ZERO_MALLOC(size, r, is_atomic, is_varsize) { \
r = (void*) BOEHM_MALLOC_ ## is_atomic ## _ ## is_varsize (size); \
- if (r == NULL) FAIL_EXCEPTION(PyExc_MemoryError, "out of memoy"); \
+ if (r == NULL) {FAIL_EXCEPTION(PyExc_MemoryError, "out of memoy");} \
else { \
if (is_atomic) /* the non-atomic versions return cleared memory */ \
memset((void*) r, 0, size); \
@@ -92,7 +92,7 @@
#define OP_ZERO_MALLOC(size, r) { \
r = (void*) malloc(size); \
- if (r == NULL) FAIL_EXCEPTION(PyExc_MemoryError, "out of memory");\
+ if (r == NULL) { FAIL_EXCEPTION(PyExc_MemoryError, "out of memory"); } \
else { \
memset((void*) r, 0, size); \
COUNT_MALLOC; \
More information about the Pypy-commit
mailing list