From 945dff7fabc07fe6e6e42a8c6a8c173bb83304f5 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 9 Mar 2016 20:59:03 +1100 Subject: [PATCH] fix i_nearest_color() for threaded builds --- Imager.xs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Imager.xs b/Imager.xs index b8bfde82..85f62248 100644 --- a/Imager.xs +++ b/Imager.xs @@ -3047,9 +3047,9 @@ i_nearest_color(im, ...) num = num <= av_len(ac) ? num : av_len(ac); num++; if (num < 2) croak("Usage: i_nearest_color array refs must have more than 1 entry each"); - xo = malloc_temp( sizeof(i_img_dim) * num ); - yo = malloc_temp( sizeof(i_img_dim) * num ); - ival = malloc_temp( sizeof(i_color) * num ); + xo = malloc_temp(aTHX_ sizeof(i_img_dim) * num ); + yo = malloc_temp(aTHX_ sizeof(i_img_dim) * num ); + ival = malloc_temp(aTHX_ sizeof(i_color) * num ); for(i = 0; i