gimp r24714 - in trunk: . plug-ins/pygimp



Author: yosh
Date: Sun Jan 27 03:01:50 2008
New Revision: 24714
URL: http://svn.gnome.org/viewvc/gimp?rev=24714&view=rev

Log:
2008-01-26  Manish Singh  <yosh gimp org>

        * plug-ins/pygimp/pygimp-colors.c (pygimp_rgb_from_pyobject): fix
        error reporting.


Modified:
   trunk/ChangeLog
   trunk/plug-ins/pygimp/pygimp-colors.c

Modified: trunk/plug-ins/pygimp/pygimp-colors.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-colors.c	(original)
+++ trunk/plug-ins/pygimp/pygimp-colors.c	Sun Jan 27 03:01:50 2008
@@ -2386,7 +2386,7 @@
     else {							\
 	PyErr_SetString(PyExc_TypeError,			\
 			#m " must be an int or a float");	\
-	return -1;						\
+	return 0;						\
     }								\
 } G_STMT_END
 
@@ -2398,6 +2398,8 @@
             SET_MEMBER(a);
         else
             rgb.a = 1.0;
+
+        return 1;
     }
 
     PyErr_SetString(PyExc_TypeError, "could not convert to GimpRGB");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]