jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bbc616e064198f9f074da2e735b9f6b3e957aada

commit bbc616e064198f9f074da2e735b9f6b3e957aada
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Wed Mar 2 12:01:15 2016 +0900

    Evas filters: Fix meaning of data 'execute' flag
    
    The doc said it would behave like "value = data" but actually
    the data part was executed directly. This should fix that.
---
 src/lib/edje/edje_calc.c                  | 4 ++--
 src/lib/efl/interfaces/efl_gfx_filter.eo  | 1 +
 src/lib/evas/filters/evas_filter_parser.c | 5 ++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 7a0fbce..55fb82f 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2618,13 +2618,13 @@ _edje_part_recalc_single_filter(Edje *ed,
                             if (cc)
                               {
                                  static const char fmt[] =
-                                       "%s={r=%d,g=%d,b=%d,a=%d,"
+                                       "{r=%d,g=%d,b=%d,a=%d,"
                                        "r2=%d,g2=%d,b2=%d,a2=%d,"
                                        "r3=%d,g3=%d,b3=%d,a3=%d}";
                                  int len = sizeof(fmt) + 20;
                                  len += strlen(data->name);
                                  buffer = alloca(len);
-                                 snprintf(buffer, len - 1, fmt, data->name,
+                                 snprintf(buffer, len - 1, fmt,
                                           (int) cc->r, (int) cc->g, (int) 
cc->b, (int) cc->a,
                                           (int) cc->r2, (int) cc->g2, (int) 
cc->b2, (int) cc->a2,
                                           (int) cc->r3, (int) cc->g3, (int) 
cc->b3, (int) cc->a3);
diff --git a/src/lib/efl/interfaces/efl_gfx_filter.eo 
b/src/lib/efl/interfaces/efl_gfx_filter.eo
index f4aabf0..52267de 100644
--- a/src/lib/efl/interfaces/efl_gfx_filter.eo
+++ b/src/lib/efl/interfaces/efl_gfx_filter.eo
@@ -98,6 +98,7 @@ interface Efl.Gfx.Filter
 
            If the $execute flag is set, then the $value can be complex and
            run, as if the original Lua program contained a line 'name = value'.
+           This can be used to pass in tables.
          ]]
          keys {
             name: const(char)*; [[Name of the global variable]]
diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 7f41234..f78c7c0 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2726,7 +2726,10 @@ _filter_program_state_set(Evas_Filter_Program *pgm)
                {
                   if (db->execute)
                     {
-                       if (luaL_dostring(L, db->value) != 0)
+                       char *buf = alloca(strlen(db->name) + strlen(db->value) 
+ 4);
+                       if (!buf) return EINA_FALSE;
+                       sprintf(buf, "%s = %s", db->name, db->value);
+                       if (luaL_dostring(L, buf) != 0)
                          {
                             ERR("Failed to run value: %s", lua_tostring(L, 
-1));
                             return EINA_FALSE;

-- 


Reply via email to