aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eet
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-03-17 08:50:54 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-17 09:58:21 +0100
commit0e5686de73a6b9a9b094311df2e82b692bf9f22f (patch)
tree73d5ace8b7155dad58a8f51f43bfa2d4f158138f /src/lib/eet
parentemile: remove use of deprecated eina binbuf function. (diff)
downloadefl-0e5686de73a6b9a9b094311df2e82b692bf9f22f.tar.gz
eet: remove use of deprecated Eina_Binbuf functions.
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_cipher.c4
-rw-r--r--src/lib/eet/eet_image.c17
-rw-r--r--src/lib/eet/eet_lib.c8
3 files changed, 14 insertions, 15 deletions
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index 119c12e62d..073d4bf8ef 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -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;
diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c
index 2b6b0c0043..3a20e8f429 100644
--- a/src/lib/eet/eet_image.c
+++ b/src/lib/eet/eet_image.c
@@ -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)))
{
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index a5ef22d18a..ef4d75c7f5 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -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);
}