Commits

camlspotter  committed 228b8e5

bug fix of c interface

  • Participants
  • Parent commits c542e42

Comments (0)

Files changed (2)

File src/tiffread.c

     }
     /* r[3] is defined above */ 
     r[4] = (value)tif;
-    res = alloc_tuple(5);
-    for(i=0; i<5; i++) Field(res, i) = r[i];
+    res = alloc_small(5,0);
+    for(i=0; i<5; i++) Store_field(res, i, r[i]);
 
     CAMLreturn(res);
   } else {

File src/xpmread.c

     }
 
     
-    { /* connect the result */
-        result = alloc_small(4,0);
-        Field(result,0) = Val_int(image.width);
-        Field(result,1) = Val_int(image.height);
-        Field(result,2) = cmap;
-        Field(result,3) = imap;
-    }
+    /* connect the result */
+    result = alloc_small(4,0);
+    Field(result,0) = Val_int(image.width);
+    Field(result,1) = Val_int(image.height);
+    Field(result,2) = cmap;
+    Field(result,3) = imap;
 
     XpmFreeXpmImage( &image );