From 3a347f610d2a3782ed12689e530c9579505949c8 Mon Sep 17 00:00:00 2001 From: Theodore Tsesmelis Date: Mon, 29 Jun 2020 20:00:21 +0200 Subject: [PATCH 1/5] fixed EINVAL not declared issue --- embree.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/embree.pyx b/embree.pyx index 2318b36..b316a38 100644 --- a/embree.pyx +++ b/embree.pyx @@ -16,7 +16,9 @@ IF UNAME_SYSNAME == "Windows": cdef void *allocate_aligned(size_t size, size_t alignment): errno = 0 cdef void *mem = _aligned_malloc(size, alignment) - if errno == ENOMEM: + if errno == EINVAL: + raise Exception('bad alignment') + elif errno == ENOMEM: raise Exception('failed to allocate') elif errno != 0: raise Exception('unhandled error') From 0dacb4196ce90ece9b157eed9102d242f0515858 Mon Sep 17 00:00:00 2001 From: ttsesm <10189018+ttsesm@users.noreply.github.com> Date: Thu, 2 Jul 2020 08:57:49 +0200 Subject: [PATCH 2/5] Update embree.pyx --- embree.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embree.pyx b/embree.pyx index b316a38..37b723b 100644 --- a/embree.pyx +++ b/embree.pyx @@ -17,8 +17,8 @@ IF UNAME_SYSNAME == "Windows": errno = 0 cdef void *mem = _aligned_malloc(size, alignment) if errno == EINVAL: - raise Exception('bad alignment') - elif errno == ENOMEM: + raise Exception('bad alignment') + elif errno == ENOMEM: raise Exception('failed to allocate') elif errno != 0: raise Exception('unhandled error') From d30534e7affa3dbb576fce2db397889bbf1fc5a7 Mon Sep 17 00:00:00 2001 From: ttsesm <10189018+ttsesm@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:07:58 +0200 Subject: [PATCH 3/5] Update embree.pyx fixed spacing --- embree.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embree.pyx b/embree.pyx index 37b723b..f54e76c 100644 --- a/embree.pyx +++ b/embree.pyx @@ -17,8 +17,8 @@ IF UNAME_SYSNAME == "Windows": errno = 0 cdef void *mem = _aligned_malloc(size, alignment) if errno == EINVAL: - raise Exception('bad alignment') - elif errno == ENOMEM: + raise Exception('bad alignment') + elif errno == ENOMEM: raise Exception('failed to allocate') elif errno != 0: raise Exception('unhandled error') From 10681ea4de261fa1f740334685548323d6292efe Mon Sep 17 00:00:00 2001 From: ttsesm <10189018+ttsesm@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:11:34 +0200 Subject: [PATCH 4/5] Update embree.pyx --- embree.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embree.pyx b/embree.pyx index f54e76c..b316a38 100644 --- a/embree.pyx +++ b/embree.pyx @@ -17,7 +17,7 @@ IF UNAME_SYSNAME == "Windows": errno = 0 cdef void *mem = _aligned_malloc(size, alignment) if errno == EINVAL: - raise Exception('bad alignment') + raise Exception('bad alignment') elif errno == ENOMEM: raise Exception('failed to allocate') elif errno != 0: From d8c95c06831277b56b991b6d55e276903e4e4d31 Mon Sep 17 00:00:00 2001 From: ttsesm <10189018+ttsesm@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:16:08 +0200 Subject: [PATCH 5/5] Update embree.pyx --- embree.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embree.pyx b/embree.pyx index b316a38..a26f551 100644 --- a/embree.pyx +++ b/embree.pyx @@ -17,8 +17,8 @@ IF UNAME_SYSNAME == "Windows": errno = 0 cdef void *mem = _aligned_malloc(size, alignment) if errno == EINVAL: - raise Exception('bad alignment') - elif errno == ENOMEM: + raise Exception('bad alignment') + elif errno == ENOMEM: raise Exception('failed to allocate') elif errno != 0: raise Exception('unhandled error')