hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=cce3c960842575d680bc13bfb2ee9523aff776f0

commit cce3c960842575d680bc13bfb2ee9523aff776f0
Author: Jaehyun Cho <[email protected]>
Date:   Fri Nov 14 17:31:18 2014 +0900

    Fix build warning
    
    Summary:
    Fix build warning
             @fix
    
    Reviewers: Hermet
    
    Reviewed By: Hermet
    
    Differential Revision: https://phab.enlightenment.org/D1661
---
 src/bin/main.c            |  4 ++--
 src/lib/Enventor_Legacy.h | 10 ++++++++++
 src/lib/edc_editor.c      | 16 ++++++++++++----
 3 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index eadc21e..b9fdb45 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -353,8 +353,8 @@ static void
 enventor_cursor_line_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
                                 void *event_info)
 {
-   int linenumber = (int) event_info;
-   stats_line_num_update(linenumber, enventor_object_max_line_get(obj));
+   Enventor_Cursor_Line *cur_line = (Enventor_Cursor_Line *)event_info;
+   stats_line_num_update(cur_line->line, enventor_object_max_line_get(obj));
 }
 
 static void
diff --git a/src/lib/Enventor_Legacy.h b/src/lib/Enventor_Legacy.h
index d572433..53dba3b 100644
--- a/src/lib/Enventor_Legacy.h
+++ b/src/lib/Enventor_Legacy.h
@@ -24,6 +24,16 @@ typedef struct
 
 typedef struct
 {
+   int line;
+} Enventor_Cursor_Line;
+
+typedef struct
+{
+   int line;
+} Enventor_Max_Line;
+
+typedef struct
+{
    Eina_Bool self_changed : 1;
 } Enventor_EDC_Modified;
 
diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c
index a3d6901..e551ac4 100644
--- a/src/lib/edc_editor.c
+++ b/src/lib/edc_editor.c
@@ -534,8 +534,10 @@ cur_line_pos_set(edit_data *ed, Eina_Bool force)
    if (!force && (ed->cur_line == line)) return;
    ed->cur_line = line;
 
+   Enventor_Cursor_Line cur_line;
+   cur_line.line = line;
    evas_object_smart_callback_call(ed->enventor, SIG_CURSOR_LINE_CHANGED,
-                                   (void *)line);
+                                   &cur_line);
 }
 
 void
@@ -785,8 +787,10 @@ err:
    if (utf8_edit) eina_file_map_free(file, utf8_edit);
    if (file) eina_file_close(file);
 
+   Enventor_Max_Line max_line;
+   max_line.line = ed->line_max;
    evas_object_smart_callback_call(ed->enventor, SIG_MAX_LINE_CHANGED,
-                                   (void *)ed->line_max);
+                                   &max_line);
 
    if (ed->view_sync_cb)
      ed->view_sync_cb(ed->view_sync_cb_data, NULL, group_name);
@@ -1214,8 +1218,10 @@ edit_line_increase(edit_data *ed, int cnt)
      }
    elm_entry_calc_force(ed->en_line);
 
+   Enventor_Max_Line max_line;
+   max_line.line = ed->line_max;
    evas_object_smart_callback_call(ed->enventor, SIG_MAX_LINE_CHANGED,
-                                   (void *)ed->line_max);
+                                   &max_line);
 }
 
 void
@@ -1246,8 +1252,10 @@ edit_line_decrease(edit_data *ed, int cnt)
 
    if (ed->line_max < 1) line_init(ed);
 
+   Enventor_Max_Line max_line;
+   max_line.line = ed->line_max;
    evas_object_smart_callback_call(ed->enventor, SIG_MAX_LINE_CHANGED,
-                                   (void *)ed->line_max);
+                                   &max_line);
 }
 
 void

-- 


Reply via email to