[EGIT] [core/enlightenment] master 02/02: Intl: fix potential stack buffer overflow.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=252198488c727aab2d859f57ca50be20e8af5e2f

commit 252198488c727aab2d859f57ca50be20e8af5e2f
Author: Tom Hacohen 
Date:   Fri Oct 9 09:26:45 2015 +0100

Intl: fix potential stack buffer overflow.

CID 1298051

@fix
---
 src/bin/e_intl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index 24f98f3..2a6e215 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -546,7 +546,8 @@ _e_intl_locale_alias_get(const char *language)
if (!alias_hash) /* No alias file available */
  return strdup(language);
 
-   strcpy(lower_language, language);
+   strncpy(lower_language, language, sizeof(lower_language) - 1);
+   lower_language[sizeof(lower_language) - 1] = '\0';
eina_str_tolower(_language);
alias = eina_hash_find(alias_hash, lower_language);
 

-- 




[EGIT] [core/efl] master 02/02: eeze - fix if formatting to be consistent within file

2015-10-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 48fb969e2062a0b76feb5a6b3465e18b462431c3
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Oct 10 10:50:44 2015 +0900

eeze - fix if formatting to be consistent within file

some if's were single line:
  if (x) blah();

others were
  if (x)
blah();

make formatting consistent at any rate.

same for EINA_LIST_FREE() blah();
---
 src/modules/eeze/sensor/udev/udev.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/modules/eeze/sensor/udev/udev.c 
b/src/modules/eeze/sensor/udev/udev.c
index 8025dfe..5697f29 100644
--- a/src/modules/eeze/sensor/udev/udev.c
+++ b/src/modules/eeze/sensor/udev/udev.c
@@ -88,8 +88,7 @@ _udev_read(void)
   else y++;
}
}
-   if (sensors)
- temp /= (double)sensors;
+if (sensors) temp /= (double)sensors;
}
 
return temp;
@@ -119,8 +118,7 @@ udev_read(Eeze_Sensor_Obj *obj)
 static Eina_Bool
 udev_async_read(Eeze_Sensor_Obj *obj, void *user_data)
 {
-   if (user_data)
- obj->user_data = user_data;
+   if (user_data) obj->user_data = user_data;
 
switch (obj->type)
  {
@@ -187,8 +185,7 @@ sensor_udev_shutdown(void)
Eeze_Sensor_Obj *sens;
 
eeze_sensor_module_unregister("udev");
-   EINA_LIST_FREE(esensor_module->sensor_list, sens)
-  free(sens);
+   EINA_LIST_FREE(esensor_module->sensor_list, sens) free(sens);
 
eina_log_domain_unregister(_eeze_sensor_udev_log_dom);
 

-- 




[EGIT] [core/efl] master 05/09: ecore_xcb: initializing the uninitialized variable.

2015-10-09 Thread Srivardhan Hebbar
cedric pushed a commit to branch master.

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

commit 675ca609b519c7de66deab3c071244b1392e09bb
Author: Srivardhan Hebbar 
Date:   Thu Oct 8 12:21:53 2015 +0200

ecore_xcb: initializing the uninitialized variable.

Summary:
realwin is uninitialized and is being checked against 0 at 384. It is set 
at 377 only if win2 == win, else it remains uninitialized. So initializing it 
to NULL.
Signed-off-by: Srivardhan Hebbar 

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3154

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_x/xcb/ecore_xcb_window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_x/xcb/ecore_xcb_window.c 
b/src/lib/ecore_x/xcb/ecore_xcb_window.c
index ce3e5ed..e877fdb 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_window.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_window.c
@@ -337,7 +337,7 @@ ecore_x_window_override_argb_new(Ecore_X_Window parent, int 
x, int y, int w, int
 EAPI Ecore_X_Window
 ecore_x_window_permanent_new(Ecore_X_Window parent, Ecore_X_Atom unique_atom)
 {
-   Ecore_X_Window win, win2, realwin;
+   Ecore_X_Window win, win2, realwin = NULL;
uint32_t mask, mask_list[9];
xcb_get_property_reply_t *reply;
xcb_get_property_cookie_t cookie;

-- 




[EGIT] [core/efl] master 01/09: ecore_fd: add _ecore_main_fdh_poll_del() when fd handler is deleted.

2015-10-09 Thread Hosang Kim
cedric pushed a commit to branch master.

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

commit ec53c8845e8d7319bbbad4fb7aa0fe3fc9bcac2a
Author: Hosang Kim 
Date:   Thu Oct 8 12:14:00 2015 +0200

ecore_fd: add _ecore_main_fdh_poll_del() when fd handler is deleted.

Summary:
When fd handler is deleted by ECORE_CALLBACK_CANCEL, 
_ecore_main_fdh_poll_del() is not called.
So fd still exists in epoll's event pool.

Reviewers: raster, seoz, woohyun, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3131

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore/ecore_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 97cfaf8..e35241d 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1546,6 +1546,7 @@ _ecore_main_fd_handlers_bads_rem(void)
ERR("Fd function err returned 0, remove it");
if (!fdh->delete_me)
  {
+_ecore_main_fdh_poll_del(fdh);
 fdh->delete_me = EINA_TRUE;
 fd_handlers_to_delete = 
eina_list_append(fd_handlers_to_delete, fdh);
  }
@@ -1558,6 +1559,7 @@ _ecore_main_fd_handlers_bads_rem(void)
   ERR("Problematic fd found at %d! setting it for delete", 
fdh->fd);
   if (!fdh->delete_me)
 {
+   _ecore_main_fdh_poll_del(fdh);
fdh->delete_me = EINA_TRUE;
fd_handlers_to_delete = 
eina_list_append(fd_handlers_to_delete, fdh);
 }
@@ -1673,6 +1675,7 @@ _ecore_main_fd_handlers_call(void)
  {
 if (!fdh->delete_me)
   {
+ _ecore_main_fdh_poll_del(fdh);
  fdh->delete_me = EINA_TRUE;
  fd_handlers_to_delete = 
eina_list_append(fd_handlers_to_delete, fdh);
   }

-- 




[EGIT] [core/efl] master 02/09: eio_monitor: fix memory leak issue

2015-10-09 Thread Vivek Ellur
cedric pushed a commit to branch master.

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

commit 491fdb94b0c85aff965662a2152863cd3bd19d11
Author: Vivek Ellur 
Date:   Thu Oct 8 12:16:23 2015 +0200

eio_monitor: fix memory leak issue

Summary:
@fix

Signed-off-by: Vivek Ellur 

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3161

Signed-off-by: Cedric BAIL 
---
 src/lib/eio/eio_monitor_cocoa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eio/eio_monitor_cocoa.c b/src/lib/eio/eio_monitor_cocoa.c
index 8cadeaf..d491de4 100644
--- a/src/lib/eio/eio_monitor_cocoa.c
+++ b/src/lib/eio/eio_monitor_cocoa.c
@@ -330,6 +330,8 @@ void eio_monitor_backend_add(Eio_Monitor *monitor)
 
if (!_stream)
  {
+free(monitor_path);
+free(backend);
 eio_monitor_fallback_add(monitor);
 return;
  }

-- 




[EGIT] [core/efl] master 04/09: ecore_xcb: handle realloc failure.

2015-10-09 Thread Srivardhan Hebbar
cedric pushed a commit to branch master.

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

commit 84127a89637838c19c44bab7c215e60552c1a93e
Author: Srivardhan Hebbar 
Date:   Thu Oct 8 12:20:46 2015 +0200

ecore_xcb: handle realloc failure.

Summary:
If realloc fails, then lst would be NULL, so assigning lst[i] only if 
realloc is successful, else assigning lst to previous memory location.

Signed-off-by: Srivardhan Hebbar 

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3155

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_x/xcb/ecore_xcb_window_prop.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_x/xcb/ecore_xcb_window_prop.c 
b/src/lib/ecore_x/xcb/ecore_xcb_window_prop.c
index 85db1eb..d3a049b 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_window_prop.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_window_prop.c
@@ -518,7 +518,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
 Ecore_X_ID item,
 intop)
 {
-   Ecore_X_ID *lst;
+   Ecore_X_ID *lst, *temp;
int i = 0, num = 0;
 
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -545,8 +545,12 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
 if (op == ECORE_X_PROP_LIST_REMOVE)
   goto done;
 num++;
+temp = lst;
 lst = realloc(lst, num * sizeof(Ecore_X_ID));
-lst[i] = item;
+if (lst)
+   lst[i] = item;
+else
+   lst = temp;
  }
ecore_x_window_prop_xid_set(win, atom, type, lst, num);
 

-- 




[EGIT] [core/efl] master 07/09: ecore_exe: correcting spelling mistake in comment.

2015-10-09 Thread Srivardhan Hebbar
cedric pushed a commit to branch master.

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

commit 01e42f86abb5d060437af68fab5c8b5afe267d08
Author: Srivardhan Hebbar 
Date:   Thu Oct 8 12:26:04 2015 +0200

ecore_exe: correcting spelling mistake in comment.

Summary:
Corrected the spelling mistake of mechanism.

Signed-off-by: Srivardhan Hebbar 

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3152

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore/ecore_exe_posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index 9e64cba..e416e23 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -1193,7 +1193,7 @@ _ecore_exe_data_generic_handler(void *data,
 * died, this won't do any harm as it must have died
 * recently and the pid has not had a chance to recycle.
 * It is also a paranoid catchall, coz the usual ecore_signal
-* mechenism should kick in.  But let's give it a good
+* mechanism should kick in.  But let's give it a good
 * kick in the head anyway.
 */
ecore_exe_terminate(obj);

-- 




[EGIT] [core/efl] master 03/09: eio_monitor: fix memory leak in eio monitor module

2015-10-09 Thread Vivek Ellur
cedric pushed a commit to branch master.

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

commit d64f50acfc01400e7465cf0288df09dfce7c3a94
Author: Vivek Ellur 
Date:   Thu Oct 8 12:17:29 2015 +0200

eio_monitor: fix memory leak in eio monitor module

Summary:
Free the allocated memory in eio monitor win32 module.

Signed-off-by: Vivek Ellur 

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3160

Signed-off-by: Cedric BAIL 
---
 src/lib/eio/eio_monitor_win32.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/eio/eio_monitor_win32.c b/src/lib/eio/eio_monitor_win32.c
index 06a5f0c..43c38f3 100644
--- a/src/lib/eio/eio_monitor_win32.c
+++ b/src/lib/eio/eio_monitor_win32.c
@@ -86,7 +86,10 @@ _eio_monitor_win32_cb(void *data, Ecore_Win32_Handler *wh 
EINA_UNUSED)
 return 0;
 
   if (fni->FileName[0] == 0)
-return ECORE_CALLBACK_CANCEL;
+{
+   free(wname);
+   return ECORE_CALLBACK_CANCEL;
+}
 
   memcpy(wname, fni->FileName, fni->FileNameLength);
   wname[fni->FileNameLength / sizeof(wchar_t)] = 0;

-- 




[EGIT] [core/efl] master 09/09: evas_canvas3d: fix mesh being added twice added to scene data

2015-10-09 Thread Oleksandr Shcherbina
cedric pushed a commit to branch master.

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

commit d61e8522e4b7f5e2582315062f586f8c9edebb19
Author: Oleksandr Shcherbina 
Date:   Thu Oct 8 12:38:10 2015 +0200

evas_canvas3d: fix mesh being added twice added to scene data

Summary: @fix

Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3143

Signed-off-by: Cedric BAIL 
---
 src/lib/evas/canvas/evas_canvas3d_node.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c 
b/src/lib/evas/canvas/evas_canvas3d_node.c
index 0b930ee..a484928 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -1093,9 +1093,6 @@ evas_canvas3d_node_mesh_collect(Evas_Canvas3D_Node *node, 
void *data)
 return EINA_FALSE;
  }
 
-   if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
- scene_data->mesh_nodes = eina_list_append(scene_data->mesh_nodes, node);
-
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/elementary] master 02/03: elm cusro config - move elm to by default look for cursors in theme

2015-10-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2cf79cf5ba72b72ae436c9ad39b812b992fd8381

commit 2cf79cf5ba72b72ae436c9ad39b812b992fd8381
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Oct 10 13:21:58 2015 +0900

elm cusro config - move elm to by default look for cursors in theme

previous config ignored elm theme if ithas cursors. this was just
wrong, so switch default back to using theme and update configs
accordingly etc. this is houw it should have worked.
---
 config/default/base.src.in  | 4 ++--
 config/mobile/base.src.in   | 4 ++--
 config/standard/base.src.in | 4 ++--
 src/lib/elm_config.c| 4 
 src/lib/elm_priv.h  | 2 +-
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/config/default/base.src.in b/config/default/base.src.in
index 5b01b5e..5caff3d 100644
--- a/config/default/base.src.in
+++ b/config/default/base.src.in
@@ -1,5 +1,5 @@
 group "Elm_Config" struct {
-  value "config_version" int: 131077;
+  value "config_version" int: 131078;
   value "engine" string: "";
   value "vsync" uchar: 0;
   value "thumbscroll_enable" uchar: 1;
@@ -40,7 +40,7 @@ group "Elm_Config" struct {
   value "theme" string: "default";
   value "modules" string: 
"prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
   value "tooltip_delay" double: 1.0;
-  value "cursor_engine_only" uchar: 1;
+  value "cursor_engine_only" uchar: 0;
   value "focus_highlight_enable" uchar: 0;
   value "focus_highlight_animate" uchar: 0;
   value "focus_highlight_clip_disable" uchar: 0;
diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in
index 6219c11..6621fb8 100644
--- a/config/mobile/base.src.in
+++ b/config/mobile/base.src.in
@@ -1,5 +1,5 @@
 group "Elm_Config" struct {
-  value "config_version" int: 131077;
+  value "config_version" int: 131078;
   value "engine" string: "";
   value "vsync" uchar: 0;
   value "thumbscroll_enable" uchar: 1;
@@ -40,7 +40,7 @@ group "Elm_Config" struct {
   value "theme" string: "default";
   value "modules" string: 
"prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
   value "tooltip_delay" double: 1.0;
-  value "cursor_engine_only" uchar: 1;
+  value "cursor_engine_only" uchar: 0;
   value "focus_highlight_enable" uchar: 0;
   value "focus_highlight_animate" uchar: 0;
   value "focus_highlight_clip_disable" uchar: 0;
diff --git a/config/standard/base.src.in b/config/standard/base.src.in
index b5f1b7a..a89beba 100644
--- a/config/standard/base.src.in
+++ b/config/standard/base.src.in
@@ -1,5 +1,5 @@
 group "Elm_Config" struct {
-  value "config_version" int: 131077;
+  value "config_version" int: 131078;
   value "engine" string: "";
   value "vsync" uchar: 0;
   value "thumbscroll_enable" uchar: 0;
@@ -40,7 +40,7 @@ group "Elm_Config" struct {
   value "theme" string: "default";
   value "modules" string: 
"prefs>prefs_iface:access_output>access/api:datetime_input_ctxpopup>datetime/api";
   value "tooltip_delay" double: 1.0;
-  value "cursor_engine_only" uchar: 1;
+  value "cursor_engine_only" uchar: 0;
   value "focus_highlight_enable" uchar: 0;
   value "focus_highlight_animate" uchar: 0;
   value "focus_highlight_clip_disable" uchar: 1;
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index f73cb7c..29ef12d 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -1786,6 +1786,10 @@ _config_update(void)
_elm_config->naviframe_prev_btn_auto_pushed = 
tcfg->naviframe_prev_btn_auto_pushed;
IFCFGEND
 
+   IFCFG(0x0006)
+   _elm_config->cursor_engine_only = 0;
+   IFCFGEND
+
/**
 * Fix user config for current ELM_CONFIG_EPOCH here.
 **/
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index 48f2267..be92f15 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -123,7 +123,7 @@ struct _Elm_Theme
  * the users config doesn't need to be wiped - simply new values need
  * to be put in
  */
-#define ELM_CONFIG_FILE_GENERATION 0x0005
+#define ELM_CONFIG_FILE_GENERATION 0x0006
 #define ELM_CONFIG_VERSION_EPOCH_OFFSET 16
 #define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << 
ELM_CONFIG_VERSION_EPOCH_OFFSET) | \
 ELM_CONFIG_FILE_GENERATION)

-- 




[EGIT] [core/elementary] master 01/03: elm cursors - if min size is too small then force it to be sane

2015-10-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=ae364b2a3ef17f8f17fcdd41aada27ee5bd7f3ee

commit ae364b2a3ef17f8f17fcdd41aada27ee5bd7f3ee
Author: Carsten Haitzler (Rasterman) 
Date:   Sat Oct 10 13:08:37 2015 +0900

elm cursors - if min size is too small then force it to be sane

cursor if less than 8x8 then make it 8x8. avoidx 0 sized pointers.

@fix
---
 src/lib/els_cursor.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index c28994b..62c00a2 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -229,6 +229,11 @@ _elm_cursor_obj_add(Evas_Object *obj, Elm_Cursor *cur)
   _elm_cursor_obj_del, cur);
edje_object_size_min_get(cur->obj, , );
edje_object_size_min_restricted_calc(cur->obj, , , x, y);
+   if ((x < 8) || (y < 8))
+ {
+x = 8;
+y = 8;
+ }
evas_object_resize(cur->obj, x, y);
return EINA_TRUE;
 }

-- 




[EGIT] [core/efl] master 01/01: Eo: Fix Eo on Windows.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit fd61ff69b3cf8246aece9e1ba3b938bbe8dbd877
Author: Tom Hacohen 
Date:   Fri Oct 9 12:06:09 2015 +0100

Eo: Fix Eo on Windows.

We use function names instead of function pointers of Windows, because
of dll import/export issues (more in a comment in eo.c). Before this
commit we were comparing the pointers to the strings instead of the
content in some of the places, which caused op desc lookup not to work.
This fixes that.

Thanks to vtorri for his assistance.

@fix
---
 src/lib/eo/eo.c   | 47 ---
 src/tests/eo/suite/eo_test_class_errors.c |  3 ++
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 13d41df..d84d110 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -671,6 +671,23 @@ end:
return EINA_FALSE;
 }
 
+static inline Eina_Bool
+_eo_api_func_equal(const void *api_func1, const void *api_func2)
+{
+#ifndef _WIN32
+  return (api_func1 == api_func2);
+#else
+  /* On Windows, DLL API's will be exported using the 
dllexport flag.
+   * When used by another library or executable, they will be 
declared
+   * using the dllimport flag. What happens really is that two 
symbols are
+   * created, at two different addresses. So it's impossible 
to match
+   * them. We fallback to plain string comparison based on the
+   * function name itself. Slow, but this should rarely happen.
+   */
+  return (api_func2 && api_func1 && !strcmp(api_func2, 
api_func1));
+#endif
+}
+
 /* api_func should be the pointer to the function on all platforms except 
windows,
  * in which it should be the the name of the function (string).
  */
@@ -692,24 +709,10 @@ _eo_api_desc_get(const void *api_func, const _Eo_Class 
*klass, const _Eo_Class *
 
  for (i = 0, op_desc = op_descs; i < cur_klass->desc->ops.count; 
i++, op_desc++)
{
-#ifndef _WIN32
-  if (op_desc->api_func == api_func)
-{
-   return op_desc;
-}
-#else
-  /* On Windows, DLL API's will be exported using the 
dllexport flag.
-   * When used by another library or executable, they will be 
declared
-   * using the dllimport flag. What happens really is that two 
symbols are
-   * created, at two different addresses. So it's impossible 
to match
-   * them. We fallback to plain string comparison based on the
-   * function name itself. Slow, but this should rarely happen.
-   */
-  if (api_func && op_desc->api_func && !strcmp(api_func, 
op_desc->api_func))
+  if (_eo_api_func_equal(op_desc->api_func, api_func))
 {
return op_desc;
 }
-#endif
}
   }
  }
@@ -731,7 +734,11 @@ EAPI Eo_Op
 _eo_api_op_id_get(const void *api_func)
 {
eina_spinlock_take(&_ops_storage_lock);
+#ifndef _WIN32
Eo_Op op = (uintptr_t) eina_hash_find(_ops_storage, _func);
+#else
+   Eo_Op op = (uintptr_t) eina_hash_find(_ops_storage, api_func);
+#endif
eina_spinlock_release(&_ops_storage_lock);
 
return op;
@@ -767,7 +774,7 @@ _eo_class_funcs_set(_Eo_Class *klass)
 
 if ((op_desc->op_type == EO_OP_TYPE_REGULAR) || (op_desc->op_type == 
EO_OP_TYPE_CLASS))
   {
- if (op_desc->api_func == last_api_func)
+ if (_eo_api_func_equal(op_desc->api_func, last_api_func))
{
   ERR("Class '%s': API previously defined (%p->%p '%s').",
   klass->desc->name, op_desc->api_func, op_desc->func, 
_eo_op_desc_name_get(op_desc));
@@ -776,7 +783,11 @@ _eo_class_funcs_set(_Eo_Class *klass)
 
  op = op_id;
  eina_spinlock_take(&_ops_storage_lock);
+#ifndef _WIN32
  eina_hash_add(_ops_storage, _desc->api_func, (void *) 
(uintptr_t) op);
+#else
+ eina_hash_add(_ops_storage, op_desc->api_func, (void *) 
(uintptr_t) op);
+#endif
  eina_spinlock_release(&_ops_storage_lock);
 
  op_id++;
@@ -1771,7 +1782,11 @@ eo_init(void)
eina_magic_string_static_set(EO_CLASS_EINA_MAGIC,
 EO_CLASS_EINA_MAGIC_STR);
 
+#ifndef _WIN32
_ops_storage = eina_hash_pointer_new(NULL);
+#else
+   _ops_storage = eina_hash_string_superfast_new(NULL);
+#endif
 
 #ifdef EO_DEBUG
/* Call it just for coverage purposes. Ugly I know, but I like it better 
than
diff --git a/src/tests/eo/suite/eo_test_class_errors.c 
b/src/tests/eo/suite/eo_test_class_errors.c
index 

[EGIT] [core/efl] master 01/01: Evas engine software generic: Fix clang warning.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 3301d869dff070e20dae90356f5355c8070e861a
Author: Tom Hacohen 
Date:   Fri Oct 9 12:41:29 2015 +0100

Evas engine software generic: Fix clang warning.

Double parenthesis comparison is reserved for evaluation for assignment, 
not just comparison.
So for example you should do ((x = 2)) and (x == 2), but not ((x == 2)) or 
(x = 2).
---
 src/modules/evas/engines/software_generic/evas_engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index 0fa92f1..dbeee24 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3445,7 +3445,7 @@ _merge_rects(Render_Engine_Merge_Mode merge_mode,
// between multiple update regions to render and total pixels to render.
if (rects)
  {
-if ((merge_mode == MERGE_BOUNDING)
+if (merge_mode == MERGE_BOUNDING
 // disable smart updates for debugging
 //|| (merge_mode == MERGE_SMART)
 )

-- 




[EGIT] [core/efl] master 02/02: Eeze sensor udev: Fix memory leak and possible crash.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 896c18045aafb9c677d8d41b4876c47db2b4d5ce
Author: Tom Hacohen 
Date:   Fri Oct 9 12:32:37 2015 +0100

Eeze sensor udev: Fix memory leak and possible crash.

Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
the last part was freed if there was one, and probably a crash if there
wasn't.

This shows again that having statements without {} is dangerous. We need
to force {} and add a lint rule, or at the very least, add a rule to put
the ; in a new line (like clang warns about by default anyway).

(Same as issue found in previous commit)

@fix
---
 src/modules/eeze/sensor/udev/udev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/eeze/sensor/udev/udev.c 
b/src/modules/eeze/sensor/udev/udev.c
index 3e7e6b3..cf52cd3 100644
--- a/src/modules/eeze/sensor/udev/udev.c
+++ b/src/modules/eeze/sensor/udev/udev.c
@@ -48,7 +48,7 @@ udev_shutdown(void)
 {
char *data;
 
-   EINA_LIST_FREE(devices, data);
+   EINA_LIST_FREE(devices, data)
  free(data);
 
return EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: Ector renderer: fix return value to be of the right type.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 7dc60520f6d8c2d3c5d81b66179ef776e5b8a6f5
Author: Tom Hacohen 
Date:   Fri Oct 9 12:37:28 2015 +0100

Ector renderer: fix return value to be of the right type.

This function expects a pointer as a return value, not a bool.

@fix.
---
 src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c 
b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
index 0857e25..4f8754f 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -56,7 +56,7 @@ _ector_renderer_cairo_gradient_radial_prepare(Eo *obj,
 {
cairo_pattern_t *pat;
 
-   USE(obj, cairo_pattern_create_radial, EINA_FALSE);
+   USE(obj, cairo_pattern_create_radial, NULL);
 
pat = cairo_pattern_create_radial(grd->focal.x, grd->focal.y, 0,
  grd->radial.x, grd->radial.y, 
grd->radius);
@@ -64,7 +64,7 @@ _ector_renderer_cairo_gradient_radial_prepare(Eo *obj,
 
_ector_renderer_cairo_gradient_prepare(obj, pat, gd, mul_col);
 
-   USE(obj, cairo_pattern_set_extend, EINA_FALSE);
+   USE(obj, cairo_pattern_set_extend, NULL);
cairo_pattern_set_extend(pat, _ector_cairo_extent_get(gd->s));
 
return pat;

-- 




[EGIT] [core/efl] master 01/01: Eio model test: initialise pointer (clang warning).

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit c4cbdca127d30b5cc8ab8d6daf22b902fe16a1b1
Author: Tom Hacohen 
Date:   Fri Oct 9 12:23:41 2015 +0100

Eio model test: initialise pointer (clang warning).

This is probably not an issue because the function should always
return a value, but initialising this variable silence clang's
warning and is not harmful anyway.
---
 src/tests/eio/eio_model_test_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/eio/eio_model_test_file.c 
b/src/tests/eio/eio_model_test_file.c
index b54ef15..270cb87 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -153,7 +153,7 @@ START_TEST(eio_model_test_test_file)
Eo *filemodel = NULL;
const Eina_Value *value_prop;
Efl_Model_Load_Status status;
-   Eina_Array *properties_list;
+   Eina_Array *properties_list = NULL;
Eina_Array_Iterator iterator;
char *str;
unsigned int i;

-- 




[EGIT] [core/efl] master 02/02: eolian-cxx: Fixed possible exception escaping main

2015-10-09 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit 932b6e74635ede0bb1a1f8b86ebfc7efac724ef4
Author: Felipe Magno de Almeida 
Date:   Fri Oct 9 13:54:32 2015 -0300

eolian-cxx: Fixed possible exception escaping main

Added try/catch around main to show the reason for the generation failure.

@fix CID 1265600
---
 src/bin/eolian_cxx/eolian_cxx.cc | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 38084f4..cb33de4 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -366,10 +366,19 @@ opts_get(int argc, char **argv)
 
 int main(int argc, char **argv)
 {
-   efl::eina::eina_init eina_init;
-   efl::eolian::eolian_init eolian_init;
-   eolian_cxx::options_type opts = opts_get(argc, argv);
-   eolian_cxx::database_load(opts);
-   eolian_cxx::run(opts);
+   try
+ {
+efl::eina::eina_init eina_init;
+efl::eolian::eolian_init eolian_init;
+eolian_cxx::options_type opts = opts_get(argc, argv);
+eolian_cxx::database_load(opts);
+eolian_cxx::run(opts);
+ }
+   catch(std::exception const& e)
+ {
+   std::cerr << "EOLCXX: Eolian C++ failed generation for the following 
reason: " << e.what() << std::endl;
+   std::cout << "EOLCXX: Eolian C++ failed generation for the following 
reason: " << e.what() << std::endl;
+   return -1;
+ }
return 0;
 }

-- 




[EGIT] [core/enlightenment] refs/notes/commits 01/01: Notes added by 'git notes add'

2015-10-09 Thread Mike Blumenkrantz
discomfitor pushed a commit to reference refs/notes/commits.

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

commit bfadb497f56c107519a3bae30d0aa44a9916f8a6
Author: Mike Blumenkrantz 
Date:   Sun Oct 4 13:07:22 2015 -0400

Notes added by 'git notes add'
---
 2a3742a52ada09b75f8431d9a9941207c45f27d3 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/2a3742a52ada09b75f8431d9a9941207c45f27d3 
b/2a3742a52ada09b75f8431d9a9941207c45f27d3
new file mode 100644
index 000..4fa6f1f
--- /dev/null
+++ b/2a3742a52ada09b75f8431d9a9941207c45f27d3
@@ -0,0 +1 @@
+ref 82116f63ab76c25325264c03798766b347417110

-- 




[EGIT] [core/efl] efl-1.15 01/01: Ecore_xcb_keymap: Fix memory leak in _ecore_xcb_keymap_finilize

2015-10-09 Thread Mrunal Sovani
discomfitor pushed a commit to branch efl-1.15.

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

commit c94dc8c0f75be18d903a200b1fc5811dd207a0b1
Author: Mrunal Sovani 
Date:   Fri Oct 9 13:17:45 2015 -0400

Ecore_xcb_keymap: Fix memory leak in _ecore_xcb_keymap_finilize

Summary:
xcb_get_modifier_mapping_reply_t *reply is obtained from
xcb_get_modifier_mapping_reply and should be freed after use.

Reviewers: raster, Hermet, tasn, zmike

Subscribers: singh.amitesh, yashu21985, alok25, sachin.dev, cedric

Differential Revision: https://phab.enlightenment.org/D3167

@fix
---
 src/lib/ecore_x/xcb/ecore_xcb_keymap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_x/xcb/ecore_xcb_keymap.c 
b/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
index 35a559c..8ec7af1 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
@@ -126,6 +126,7 @@ _ecore_xcb_keymap_finalize(void)
ECORE_X_LOCK_NUM = _ecore_xcb_keymap_mask_get(reply, XK_Num_Lock);
ECORE_X_LOCK_CAPS = _ecore_xcb_keymap_mask_get(reply, XK_Caps_Lock);
ECORE_X_LOCK_SHIFT = _ecore_xcb_keymap_mask_get(reply, XK_Shift_Lock);
+   free(reply);
 }
 
 void

-- 




[EGIT] [core/efl] master 01/01: Ecore_xcb_keymap: Fix memory leak in _ecore_xcb_keymap_finilize

2015-10-09 Thread Mrunal Sovani
discomfitor pushed a commit to branch master.

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

commit 2fc00da9fae273312a4f5b5cf837f11efaa93392
Author: Mrunal Sovani 
Date:   Fri Oct 9 13:17:45 2015 -0400

Ecore_xcb_keymap: Fix memory leak in _ecore_xcb_keymap_finilize

Summary:
xcb_get_modifier_mapping_reply_t *reply is obtained from
xcb_get_modifier_mapping_reply and should be freed after use.

Reviewers: raster, Hermet, tasn, zmike

Subscribers: singh.amitesh, yashu21985, alok25, sachin.dev, cedric

Differential Revision: https://phab.enlightenment.org/D3167

@fix
---
 src/lib/ecore_x/xcb/ecore_xcb_keymap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/ecore_x/xcb/ecore_xcb_keymap.c 
b/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
index 35a559c..8ec7af1 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_keymap.c
@@ -126,6 +126,7 @@ _ecore_xcb_keymap_finalize(void)
ECORE_X_LOCK_NUM = _ecore_xcb_keymap_mask_get(reply, XK_Num_Lock);
ECORE_X_LOCK_CAPS = _ecore_xcb_keymap_mask_get(reply, XK_Caps_Lock);
ECORE_X_LOCK_SHIFT = _ecore_xcb_keymap_mask_get(reply, XK_Shift_Lock);
+   free(reply);
 }
 
 void

-- 




[EGIT] [core/efl] master 01/02: eolian-cxx: Fixed assert which was a tautology

2015-10-09 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit 13606c46474364e9dafa7aa6c1addf3be89950ce
Author: Felipe Magno de Almeida 
Date:   Fri Oct 9 13:48:17 2015 -0300

eolian-cxx: Fixed assert which was a tautology

Fixed the assert to the correct check

@fix CID 1316018
---
 src/lib/eolian_cxx/eo_validate.hh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian_cxx/eo_validate.hh 
b/src/lib/eolian_cxx/eo_validate.hh
index 0b6f5cf..8ffa7dc 100644
--- a/src/lib/eolian_cxx/eo_validate.hh
+++ b/src/lib/eolian_cxx/eo_validate.hh
@@ -71,10 +71,10 @@ eo_class_validate(const eo_class& cls)
 {
// class name and type
_validate(cls.name, cls);
-   assert(cls.type != eo_class::regular_ ||
-  cls.type != eo_class::regular_noninst_ ||
-  cls.type != eo_class::interface_ ||
-  cls.type != eo_class::mixin_);
+   assert(cls.type == eo_class::regular_ ||
+  cls.type == eo_class::regular_noninst_ ||
+  cls.type == eo_class::interface_ ||
+  cls.type == eo_class::mixin_);
 
// constructors
for (auto it = cls.constructors.cbegin(), last = cls.constructors.cend();

-- 




[EGIT] [core/efl] master 01/01: Evas engine wayland_shm: pass the correct enum value.

2015-10-09 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 4a92415d12bffefa6fcf216656b0a4b1e618d226
Author: Tom Hacohen 
Date:   Fri Oct 9 14:22:36 2015 +0100

Evas engine wayland_shm: pass the correct enum value.

Following this patch, the correct enum type is now passed to this
function. It's also passing the same value (0), but now from the correct
enum. This doesn't change behaviour, and looks like what was intended.

This fixes the clang warning.
---
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index 59f1a35..99b42e4 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -82,7 +82,7 @@ _evas_outbuf_free(Outbuf *ob)
 eina_rectangle_free(rect);
  }
 
-   _evas_outbuf_flush(ob, NULL, MODE_FULL);
+   _evas_outbuf_flush(ob, NULL, EVAS_RENDER_MODE_UNDEF);
_evas_outbuf_idle_flush(ob);
 
if (ob->surface) _evas_shm_surface_destroy(ob->surface);

--