summaryrefslogtreecommitdiff
path: root/src/bindings
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 /src/bindings
parent8e077745bca8ae452f13d5f35ab9678a0ac6c355 (diff)
eo_cxx: correct constness of basic Eo C++ wrapper functions
Diffstat (limited to 'src/bindings')
-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)
27 return ::eo_ref(obj); 27 return ::eo_ref(obj);
28} 28}
29 29
30inline const Eo*
31ref(const Eo *obj)
32{
33 return ::eo_ref(obj);
34}
35
30inline void 36inline void
31unref(Eo *obj) 37unref(const Eo *obj)
32{ 38{
33 ::eo_unref(obj); 39 ::eo_unref(obj);
34} 40}
35 41
36inline int 42inline int
37ref_get(Eo *obj) 43ref_get(const Eo *obj)
38{ 44{
39 return ::eo_ref_get(obj); 45 return ::eo_ref_get(obj);
40} 46}
@@ -46,13 +52,13 @@ del(Eo *obj)
46} 52}
47 53
48inline Eina_Bool 54inline Eina_Bool
49isa(Eo *obj, Eo_Class *klass) 55isa(const Eo *obj, const Eo_Class *klass)
50{ 56{
51 return eo_isa(obj, klass); 57 return eo_isa(obj, klass);
52} 58}
53 59
54inline Eo* 60inline Eo*
55add(Eo_Class *klass, Eo *parent = NULL) 61add(const Eo_Class *klass, Eo *parent = NULL)
56{ 62{
57 Eo *eo = nullptr; 63 Eo *eo = nullptr;
58 eo_add_ref(&eo, klass, parent); 64 eo_add_ref(&eo, klass, parent);
@@ -72,7 +78,7 @@ base_data_set(Eo *obj, const char *key, const void *data)
72} 78}
73 79
74inline void* 80inline void*
75base_data_get(Eo *obj, const char *key) 81base_data_get(const Eo *obj, const char *key)
76{ 82{
77 void *data; 83 void *data;
78 data = eo_key_data_get(obj, key); 84 data = eo_key_data_get(obj, key);
@@ -92,7 +98,7 @@ parent_set(Eo *obj, Eo *parent)
92} 98}
93 99
94inline Eo* 100inline Eo*
95parent_get(Eo *obj) 101parent_get(const Eo *obj)
96{ 102{
97 Eo *parent; 103 Eo *parent;
98 parent = eo_parent_get(obj); 104 parent = eo_parent_get(obj);
@@ -112,7 +118,7 @@ event_thaw(Eo *obj)
112} 118}
113 119
114inline int 120inline int
115event_freeze_get(Eo *obj) 121event_freeze_get(const Eo *obj)
116{ 122{
117 int count = -1; 123 int count = -1;
118 count = eo_event_freeze_count_get(obj); 124 count = eo_event_freeze_count_get(obj);