aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-03-09 18:51:21 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-09 18:52:10 -0300
commit7973126165912d5239cbc1b1b9ff851fc12aac1b (patch)
tree2f7e6f984f553e81efbec20862477ca8a400d53a
parentecore-drm: don't set DBG on log level if DBG not already set (diff)
downloadefl-7973126165912d5239cbc1b1b9ff851fc12aac1b.tar.gz
eo_cxx: correct constness of basic Eo C++ wrapper functions
-rw-r--r--src/bindings/eo_cxx/eo_ops.hh20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/bindings/eo_cxx/eo_ops.hh b/src/bindings/eo_cxx/eo_ops.hh
index 9aecf61880..653dcf327d 100644
--- a/src/bindings/eo_cxx/eo_ops.hh
+++ b/src/bindings/eo_cxx/eo_ops.hh
@@ -27,14 +27,20 @@ ref(Eo *obj)
return ::eo_ref(obj);
}
+inline const Eo*
+ref(const Eo *obj)
+{
+ return ::eo_ref(obj);
+}
+
inline void
-unref(Eo *obj)
+unref(const Eo *obj)
{
::eo_unref(obj);
}
inline int
-ref_get(Eo *obj)
+ref_get(const Eo *obj)
{
return ::eo_ref_get(obj);
}
@@ -46,13 +52,13 @@ del(Eo *obj)
}
inline Eina_Bool
-isa(Eo *obj, Eo_Class *klass)
+isa(const Eo *obj, const Eo_Class *klass)
{
return eo_isa(obj, klass);
}
inline Eo*
-add(Eo_Class *klass, Eo *parent = NULL)
+add(const Eo_Class *klass, Eo *parent = NULL)
{
Eo *eo = nullptr;
eo_add_ref(&eo, klass, parent);
@@ -72,7 +78,7 @@ base_data_set(Eo *obj, const char *key, const void *data)
}
inline void*
-base_data_get(Eo *obj, const char *key)
+base_data_get(const Eo *obj, const char *key)
{
void *data;
data = eo_key_data_get(obj, key);
@@ -92,7 +98,7 @@ parent_set(Eo *obj, Eo *parent)
}
inline Eo*
-parent_get(Eo *obj)
+parent_get(const Eo *obj)
{
Eo *parent;
parent = eo_parent_get(obj);
@@ -112,7 +118,7 @@ event_thaw(Eo *obj)
}
inline int
-event_freeze_get(Eo *obj)
+event_freeze_get(const Eo *obj)
{
int count = -1;
count = eo_event_freeze_count_get(obj);