delete([]), does nothing but do not return an error 59/13959/2
Antoine ELIAS [Mon, 10 Mar 2014 08:46:23 +0000 (09:46 +0100)]
Change-Id: Iabf3247425e79a8c6f380156bc5d71f6a462e6e8

scilab/modules/graphics/sci_gateway/c/sci_delete.c

index e15d029..5c59604 100644 (file)
@@ -105,6 +105,21 @@ int sci_delete(char *fname, unsigned long fname_len)
 
         switch (getInputArgumentType(pvApiCtx, 1))
         {
+            case sci_matrix:
+            {
+                if (isEmptyMatrix(pvApiCtx, piAddrl1))
+                {
+                    AssignOutputVariable(pvApiCtx, 1) = 0;
+                    ReturnArguments(pvApiCtx);
+                    return 1;
+                }
+                else
+                {
+                    Scierror(202, _("%s: Wrong type for input argument #%d: Handle matrix expected.\n"), fname, 1);
+                    return 1;
+                }
+                break;
+            }
             case sci_handles:      /* delete Entity given by a handle */
 
                 // Retrieve a matrix of handle at position 1.