camlspotter avatar camlspotter committed 29ae305

C interface fix

Comments (0)

Files changed (1)

       */
 
       if( color->c_color == NULL ) {
-	fprintf(stderr, "color id %d has no c_color\n", i);
-	Store_field(cmap, i, copy_string("null"));
+          fprintf(stderr, "color id %d has no c_color\n", i);
+          Store_field(cmap, i, copy_string("null"));
       } else {
-	Store_field(cmap, i, copy_string(color->c_color));
+          Store_field(cmap, i, copy_string(color->c_color));
       }
     }
 
 
       imap = alloc_tuple( size );
       for(i=0; i<size; i++){
-	Field(imap,i) = Val_int(image.data[i]);
+          Store_field(imap,i,Val_int(image.data[i]));
       }
     }
 
     
     { /* connect the result */
-      result = alloc_tuple(4);
-      Field(result,0) = Val_int(image.width);
-      Field(result,1) = Val_int(image.height);
-      Field(result,2) = cmap;
-      Field(result,3) = imap;
+        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 );
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.