summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/language/evas_bidi_utils.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-11 09:42:24 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-11 10:03:17 -0400
commit9d9aa8b6ae0c07ebe23e1ea3fcb81f8050311651 (patch)
tree69bd8a9ad6cb22352f19e20989e92abadc08bc0e /src/lib/evas/common/language/evas_bidi_utils.c
parentdd093de23cb0d0eb9b3de5513ef9881b2566efca (diff)
evas/language: #ifdef guard variable which is only used inside #ifdef
Summary: this variable is already only changed inside an #ifdef, so declare and free it only inside the same ifdef for clarity CIDs 1401016, 1400807 Reviewers: cedric Reviewed By: cedric Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10320
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/language/evas_bidi_utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/common/language/evas_bidi_utils.c b/src/lib/evas/common/language/evas_bidi_utils.c
index a4653416e7..c8360643a2 100644
--- a/src/lib/evas/common/language/evas_bidi_utils.c
+++ b/src/lib/evas/common/language/evas_bidi_utils.c
@@ -233,7 +233,9 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
233 EvasBiDiCharType *char_types = NULL; 233 EvasBiDiCharType *char_types = NULL;
234 EvasBiDiLevel *embedding_levels = NULL; 234 EvasBiDiLevel *embedding_levels = NULL;
235 const FriBidiChar *ustr; 235 const FriBidiChar *ustr;
236#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
236 FriBidiChar *base_ustr = NULL; 237 FriBidiChar *base_ustr = NULL;
238#endif
237 EvasBiDiLevel ret_level = 0; 239 EvasBiDiLevel ret_level = 0;
238#if FRIBIDI_MAJOR_VERSION >= 1 240#if FRIBIDI_MAJOR_VERSION >= 1
239 EvasBiDiBracketType *bracket_types = NULL; 241 EvasBiDiBracketType *bracket_types = NULL;
@@ -392,8 +394,9 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
392 free(bidi_props->char_types); 394 free(bidi_props->char_types);
393 } 395 }
394 bidi_props->char_types = char_types; 396 bidi_props->char_types = char_types;
395 397#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
396 if (base_ustr) free(base_ustr); 398 if (base_ustr) free(base_ustr);
399#endif
397#if FRIBIDI_MAJOR_VERSION >= 1 400#if FRIBIDI_MAJOR_VERSION >= 1
398 /* Currently, bracket_types is not reused in other places. */ 401 /* Currently, bracket_types is not reused in other places. */
399 if (bracket_types) free(bracket_types); 402 if (bracket_types) free(bracket_types);
@@ -408,7 +411,9 @@ cleanup:
408 if (bracket_types) free(bracket_types); 411 if (bracket_types) free(bracket_types);
409#endif 412#endif
410 if (embedding_levels) free(embedding_levels); 413 if (embedding_levels) free(embedding_levels);
414#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
411 if (base_ustr) free(base_ustr); 415 if (base_ustr) free(base_ustr);
416#endif
412 if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */ 417 if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */
413 return NULL; 418 return NULL;
414} 419}