]> git.imager.perl.org - imager.git/commitdiff
report the mismatched version numbers if the Imager API version doesn't match
authorTony Cook <tony@develop-help.com>
Tue, 14 Jun 2011 13:30:45 +0000 (23:30 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 14 Jun 2011 13:53:26 +0000 (23:53 +1000)
imext.h

diff --git a/imext.h b/imext.h
index 9c55b4b849d82c83d88bdf24d59a6f65cb5055b4..5e8b2df2f5add30697a1c1f9ca58af2d943c1d82 100644 (file)
--- a/imext.h
+++ b/imext.h
@@ -17,8 +17,10 @@ extern im_ext_funcs *imager_function_ext_table;
     imager_function_ext_table = INT2PTR(im_ext_funcs *, SvIV(get_sv(PERL_FUNCTION_TABLE_NAME, 1))); \
     if (!imager_function_ext_table) \
       croak("Imager API function table not found!"); \
-    if (imager_function_ext_table->version != IMAGER_API_VERSION) \
-      croak("Imager API version incorrect"); \
+    if (imager_function_ext_table->version != IMAGER_API_VERSION) {  \
+      croak("Imager API version incorrect loaded %d vs expected %d", \
+           imager_function_ext_table->version, IMAGER_API_VERSION); \
+    } \
     if (imager_function_ext_table->level < IMAGER_MIN_API_LEVEL) \
       croak("API level %d below minimum of %d", imager_function_ext_table->level, IMAGER_MIN_API_LEVEL); \
   } while (0)