[arrayfire] 59/84: Use AF_RETURN_ERROR when Image IO is not configured

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository arrayfire.

commit e26c34156655daff878e60ab1d18bafed973082f
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Dec 28 21:28:47 2015 -0500

    Use AF_RETURN_ERROR when Image IO is not configured
---
 src/api/c/imageio.cpp  | 15 +++++----------
 src/api/c/imageio2.cpp |  6 ++----
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/api/c/imageio.cpp b/src/api/c/imageio.cpp
index 3442a2a..d4855ad 100644
--- a/src/api/c/imageio.cpp
+++ b/src/api/c/imageio.cpp
@@ -715,31 +715,26 @@ af_err af_delete_image_memory(void *ptr)
 #include <stdio.h>
 af_err af_load_image(af_array *out, const char* filename, const bool isColor)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 
 af_err af_save_image(const char* filename, const af_array in_)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 
 af_err af_load_image_memory(af_array *out, const void* ptr)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 
 af_err af_save_image_memory(void **ptr, const af_array in_, const af_image_format format)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 
 af_err af_delete_image_memory(void *ptr)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 #endif  // WITH_FREEIMAGE
diff --git a/src/api/c/imageio2.cpp b/src/api/c/imageio2.cpp
index de12fc7..a51bacb 100644
--- a/src/api/c/imageio2.cpp
+++ b/src/api/c/imageio2.cpp
@@ -377,13 +377,11 @@ af_err af_save_image_native(const char* filename, const af_array in)
 #include <stdio.h>
 af_err af_load_image_native(af_array *out, const char* filename)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 
 af_err af_save_image_native(const char* filename, const af_array in)
 {
-    printf("Error: Image IO requires FreeImage. See https://github.com/arrayfire/arrayfire\n");
-    return AF_ERR_NOT_CONFIGURED;
+    AF_RETURN_ERROR("ArrayFire compiled without Image IO (FreeImage) support", AF_ERR_NOT_CONFIGURED);
 }
 #endif  // WITH_FREEIMAGE

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list