Merge remote-tracking branch 'origin/master' into YaSp
[scilab.git] / scilab / modules / graphics / src / c / getHandleProperty / get_mark_background_property.c
index a37f0d7..88c987a 100644 (file)
@@ -30,7 +30,7 @@
 #include "graphicObjectProperties.h"
 
 /*------------------------------------------------------------------------*/
-int get_mark_background_property(void* _pvCtx, int iObjUID)
+void* get_mark_background_property(void* _pvCtx, int iObjUID)
 {
     int iMarkBackground = 0;
     int* piMarkBackground = &iMarkBackground;
@@ -39,23 +39,23 @@ int get_mark_background_property(void* _pvCtx, int iObjUID)
     int numMarkBackgrounds = 0;
     int * piNumMarkBackgrounds = &numMarkBackgrounds;
 
-    getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds);
+       getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds);
 
     if (piNumMarkBackgrounds == NULL)
     {
         Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background");
-        return -1;
+        return NULL;
     }
 
-    if (numMarkBackgrounds == 0)
-    {
-        getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground);
-        return sciReturnDouble(_pvCtx, iMarkBackground);
-    }
-    else
-    {
-        getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds);
-        return sciReturnRowVectorFromInt(_pvCtx, markBackgrounds, numMarkBackgrounds);
-    }
+       if (numMarkBackgrounds == 0)
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground);
+               return sciReturnDouble(iMarkBackground);
+       }
+       else
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds);
+               return sciReturnRowVectorFromInt(markBackgrounds, numMarkBackgrounds);
+       }
 }
 /*------------------------------------------------------------------------*/