From 8006fd4e940cacf334a3683265948245e3a4fdc2 Mon Sep 17 00:00:00 2001 From: "Travis E. Oliphant" Date: Mon, 25 Jun 2012 13:33:14 -0500 Subject: Restore ability to not include semi-colons. --- numpy/core/include/numpy/ndarraytypes.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'numpy') diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index 9605c20f8..354669d56 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -914,21 +914,21 @@ typedef int (PyArray_FinalizeFunc)(PyArrayObject *, PyObject *); #if NPY_ALLOW_THREADS #define NPY_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS #define NPY_END_ALLOW_THREADS Py_END_ALLOW_THREADS -#define NPY_BEGIN_THREADS_DEF PyThreadState *_save=NULL -#define NPY_BEGIN_THREADS do {_save = PyEval_SaveThread();} while (0) -#define NPY_END_THREADS do {if (_save) PyEval_RestoreThread(_save);} while (0) +#define NPY_BEGIN_THREADS_DEF PyThreadState *_save=NULL; +#define NPY_BEGIN_THREADS do {_save = PyEval_SaveThread();} while (0); +#define NPY_END_THREADS do {if (_save) PyEval_RestoreThread(_save);} while (0); #define NPY_BEGIN_THREADS_DESCR(dtype) \ do {if (!(PyDataType_FLAGCHK(dtype, NPY_NEEDS_PYAPI))) \ - NPY_BEGIN_THREADS;} while (0) + NPY_BEGIN_THREADS;} while (0); #define NPY_END_THREADS_DESCR(dtype) \ do {if (!(PyDataType_FLAGCHK(dtype, NPY_NEEDS_PYAPI))) \ - NPY_END_THREADS; } while (0) + NPY_END_THREADS; } while (0); -#define NPY_ALLOW_C_API_DEF PyGILState_STATE __save__ -#define NPY_ALLOW_C_API do {__save__ = PyGILState_Ensure();} while (0) -#define NPY_DISABLE_C_API do {PyGILState_Release(__save__);} while (0) +#define NPY_ALLOW_C_API_DEF PyGILState_STATE __save__; +#define NPY_ALLOW_C_API do {__save__ = PyGILState_Ensure();} while (0); +#define NPY_DISABLE_C_API do {PyGILState_Release(__save__);} while (0); #else #define NPY_BEGIN_ALLOW_THREADS #define NPY_END_ALLOW_THREADS -- cgit v1.2.1 From 1d4decdf49b26bab6889ed8ab2943558709567ca Mon Sep 17 00:00:00 2001 From: "Travis E. Oliphant" Date: Thu, 28 Jun 2012 10:42:11 -0500 Subject: API: Restore ability to not use semicolons. --- numpy/core/include/numpy/ufuncobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy') diff --git a/numpy/core/include/numpy/ufuncobject.h b/numpy/core/include/numpy/ufuncobject.h index 7f717a2c1..076dd880c 100644 --- a/numpy/core/include/numpy/ufuncobject.h +++ b/numpy/core/include/numpy/ufuncobject.h @@ -257,8 +257,8 @@ typedef struct _tagPyUFuncObject { (UFUNC_ERR_WARN << UFUNC_SHIFT_INVALID) #if NPY_ALLOW_THREADS -#define NPY_LOOP_BEGIN_THREADS do {if (!(loop->obj & UFUNC_OBJ_NEEDS_API)) _save = PyEval_SaveThread();} while (0) -#define NPY_LOOP_END_THREADS do {if (!(loop->obj & UFUNC_OBJ_NEEDS_API)) PyEval_RestoreThread(_save);} while (0) +#define NPY_LOOP_BEGIN_THREADS do {if (!(loop->obj & UFUNC_OBJ_NEEDS_API)) _save = PyEval_SaveThread();} while (0); +#define NPY_LOOP_END_THREADS do {if (!(loop->obj & UFUNC_OBJ_NEEDS_API)) PyEval_RestoreThread(_save);} while (0); #else #define NPY_LOOP_BEGIN_THREADS #define NPY_LOOP_END_THREADS -- cgit v1.2.1