eet: remove use of deprecated Eina_Binbuf functions.
authorCedric BAIL <cedric@osg.samsung.com>
Tue, 17 Mar 2015 07:50:54 +0000 (08:50 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 17 Mar 2015 08:58:21 +0000 (09:58 +0100)
src/lib/eet/eet_cipher.c
src/lib/eet/eet_image.c
src/lib/eet/eet_lib.c

index 119c12e..073d4bf 100644 (file)
@@ -882,7 +882,7 @@ eet_cipher(const void   *data,
    Eina_Binbuf *out;
    Eina_Binbuf *in;
 
-   in = eina_binbuf_manage_read_only_new_length(data, size);
+   in = eina_binbuf_manage_new(data, size, EINA_TRUE);
    out = emile_binbuf_cipher(EMILE_AES256_CBC, in, key, length);
 
    if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0;
@@ -903,7 +903,7 @@ eet_decipher(const void   *data,
    Eina_Binbuf *out;
    Eina_Binbuf *in;
 
-   in = eina_binbuf_manage_read_only_new_length(data, size);
+   in = eina_binbuf_manage_new(data, size, EINA_TRUE);
    out = emile_binbuf_decipher(EMILE_AES256_CBC, in, key, length);
 
    if (result_length) *result_length = out ? eina_binbuf_length_get(out) : 0;
index 2b6b0c0..3a20e8f 100644 (file)
@@ -354,7 +354,7 @@ eet_data_image_jpeg_header_decode(const void   *data,
    Emile_Image_Load_Error error;
    int r = 0;
 
-   bin = eina_binbuf_manage_read_only_new_length(data, size);
+   bin = eina_binbuf_manage_new(data, size, EINA_TRUE);
    if (!bin) return 0;
 
    memset(&opts, 0, sizeof (Emile_Image_Load_Opts));
@@ -407,7 +407,7 @@ eet_data_image_jpeg_rgb_decode(const void   *data,
    // Fix for ABI incompatibility between 1.10 and 1.11
    if (cspace == 8) cspace = 9;
 
-   bin = eina_binbuf_manage_read_only_new_length(data, size);
+   bin = eina_binbuf_manage_new(data, size, EINA_TRUE);
    if (!bin) return 0;
 
    memset(&opts, 0, sizeof (Emile_Image_Load_Opts));
@@ -461,7 +461,7 @@ eet_data_image_jpeg_alpha_decode(const void   *data,
    if (!pixels)
      return 0;
 
-   bin = eina_binbuf_manage_read_only_new_length(data, size);
+   bin = eina_binbuf_manage_new(data, size, EINA_TRUE);
    if (!bin) return 0;
 
    memset(&opts, 0, sizeof (Emile_Image_Load_Opts));
@@ -590,7 +590,7 @@ eet_data_image_etc2_decode(const void *data,
    // Fix for ABI incompatibility between 1.10 and 1.11
    if (cspace == 8) cspace = 9;
 
-   bin = eina_binbuf_manage_read_only_new_length(data, length);
+   bin = eina_binbuf_manage_new(data, length, EINA_TRUE);
    if (!bin) return 0;
 
    memset(&opts, 0, sizeof (Emile_Image_Load_Opts));
@@ -714,7 +714,7 @@ eet_data_image_lossless_compressed_convert(int         *size,
            data = (const char *) bigend_data;
         }
 
-      in = eina_binbuf_manage_read_only_new_length(data, w * h * 4);
+      in = eina_binbuf_manage_new(data, w * h * 4, EINA_TRUE);
       if (!in)
         {
            free(bigend_data);
@@ -1034,7 +1034,7 @@ eet_data_image_etc1_compressed_convert(int         *size,
                          }
                     }
 
-                  in = eina_binbuf_manage_read_only_new_length(buffer, block_count * etc_block_size);
+                  in = eina_binbuf_manage_new(buffer, block_count * etc_block_size, EINA_TRUE);
                   if (compress)
                     {
                        Eina_Binbuf *out;
@@ -1977,13 +1977,12 @@ _eet_data_image_decode_inside(const void   *data,
              Eina_Binbuf *in;
              Eina_Binbuf *out;
 
-             in = eina_binbuf_manage_read_only_new_length((const unsigned char *) body, size - 8 * sizeof (int));
+             in = eina_binbuf_manage_new((const unsigned char *) body, size - 8 * sizeof (int), EINA_TRUE);
              if (!in) return 0;
 
              if ((src_h == h) && (src_w == w) && (row_stride == src_w * 4))
                {
-                  out = eina_binbuf_manage_read_only_new_length((void*) d,
-                                                                w * h * 4);
+                  out = eina_binbuf_manage_new((void*) d, w * h * 4, EINA_TRUE);
                   if (!emile_expand(in, out,
                                            eet_2_emile_compressor(comp)))
                     {
index a5ef22d..ef4d75c 100644 (file)
@@ -2199,7 +2199,7 @@ eet_alias(Eet_File   *ef,
    /* figure hash bucket */
    hash = _eet_hash_gen(name, ef->header->directory->size);
 
-   in = eina_binbuf_manage_read_only_new_length((unsigned char*) destination, strlen(destination) + 1);
+   in = eina_binbuf_manage_new((unsigned char*) destination, strlen(destination) + 1, EINA_TRUE);
    if (!in) goto on_error;
 
    /* if we want to compress */
@@ -2322,7 +2322,7 @@ eet_write_cipher(Eet_File   *ef,
 
    UNLOCK_FILE(ef);
 
-   in = eina_binbuf_manage_read_only_new_length(data, size);
+   in = eina_binbuf_manage_new(data, size, EINA_TRUE);
    if (comp)
      {
         Eina_Binbuf *out;
@@ -2740,7 +2740,7 @@ read_binbuf_from_disk(Eet_File      *ef,
                       Eet_File_Node *efn)
 {
    if (efn->data)
-     return eina_binbuf_manage_read_only_new_length(efn->data, efn->size);
+     return eina_binbuf_manage_new(efn->data, efn->size, EINA_TRUE);
 
    if (efn->offset > ef->data_size)
      return 0;
@@ -2751,5 +2751,5 @@ read_binbuf_from_disk(Eet_File      *ef,
    if ((efn->offset + efn->size) > ef->data_size)
      return 0;
 
-   return eina_binbuf_manage_read_only_new_length(ef->data + efn->offset, efn->size);
+   return eina_binbuf_manage_new(ef->data + efn->offset, efn->size, EINA_TRUE);
 }