diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2014-02-22 15:04:38 -0800 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2014-02-22 15:04:38 -0800 |
commit | 2d1aecd731f91f7367ef2a4069d305e2a1b488c0 (patch) | |
tree | 4e9f8c58c8ce19f78f59df36f1c73c64f38712cf | |
parent | c007f6e77336a9c7cc3f6cf7340895782bb67235 (diff) | |
parent | 6e16b1720f31e8803658aedd793b27929b04dc8f (diff) | |
download | pycrypto-2d1aecd731f91f7367ef2a4069d305e2a1b488c0.tar.gz |
Merge branch 'fix-aesni-aligned-malloc'
-rw-r--r-- | src/AESNI.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/AESNI.c b/src/AESNI.c index 6a200ab..50f0cd6 100644 --- a/src/AESNI.c +++ b/src/AESNI.c @@ -63,7 +63,11 @@ static void* aligned_malloc_wrapper(size_t alignment, size_t size) } # define aligned_free_wrapper free #elif defined(HAVE__ALIGNED_MALLOC) /* _aligned_malloc is available on Windows */ -# define aligned_malloc_wrapper _aligned_malloc +static void* aligned_malloc_wrapper(size_t alignment, size_t size) +{ + /* NB: _aligned_malloc takes its args in the opposite order from aligned_alloc */ + return _aligned_malloc(size, alignment); +} # define aligned_free_wrapper _aligned_free #else # error "No function to allocate/free aligned memory is available." |