summaryrefslogtreecommitdiff
path: root/include/efl.eina.pxd
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-04-05 03:13:15 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-04-05 03:13:15 +0300
commitadf70fa26fcae845b0bc55c6eebcaeafadc4d1c7 (patch)
treec5bf8953e6b6081bb6542eb5372295875151df02 /include/efl.eina.pxd
parent1149c6ed91a5dcb6e23998ba112d9e3d20a5ceb9 (diff)
Remove const hacks
They were a workaround for limitations in Cython <0.18
Diffstat (limited to 'include/efl.eina.pxd')
-rw-r--r--include/efl.eina.pxd59
1 files changed, 28 insertions, 31 deletions
diff --git a/include/efl.eina.pxd b/include/efl.eina.pxd
index 0c67518..cc0e0b9 100644
--- a/include/efl.eina.pxd
+++ b/include/efl.eina.pxd
@@ -16,8 +16,8 @@
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18from cpython cimport va_list 18from cpython cimport va_list
19from libc.stdlib cimport const_void, malloc, free 19from libc.stdlib cimport malloc, free
20from libc.string cimport const_char, memcpy, strdup 20from libc.string cimport memcpy, strdup
21 21
22cdef extern from "time.h": 22cdef extern from "time.h":
23 struct tm: 23 struct tm:
@@ -32,7 +32,7 @@ cdef extern from "time.h":
32 int tm_isdst 32 int tm_isdst
33 33
34 long int tm_gmtoff 34 long int tm_gmtoff
35 const_char *tm_zone 35 const char *tm_zone
36 36
37 37
38cdef extern from "Eina.h": 38cdef extern from "Eina.h":
@@ -57,7 +57,7 @@ cdef extern from "Eina.h":
57 # 57 #
58 ctypedef unsigned char Eina_Bool 58 ctypedef unsigned char Eina_Bool
59 ctypedef int Eina_Error 59 ctypedef int Eina_Error
60 ctypedef const_char Eina_Stringshare 60 ctypedef const char Eina_Stringshare
61 # This is actually either wchar_t or uint32_t, Cython 61 # This is actually either wchar_t or uint32_t, Cython
62 # should use an appropriate integer automatically 62 # should use an appropriate integer automatically
63 ctypedef Py_UCS4 Eina_Unicode 63 ctypedef Py_UCS4 Eina_Unicode
@@ -76,7 +76,6 @@ cdef extern from "Eina.h":
76 Eina_List *next 76 Eina_List *next
77 Eina_List *prev 77 Eina_List *prev
78 void *accounting 78 void *accounting
79 ctypedef Eina_List const_Eina_List "const Eina_List"
80 79
81 ctypedef struct Eina_Hash 80 ctypedef struct Eina_Hash
82 81
@@ -84,7 +83,6 @@ cdef extern from "Eina.h":
84 void *key 83 void *key
85 void *data 84 void *data
86 unsigned int key_length 85 unsigned int key_length
87 ctypedef Eina_Hash_Tuple const_Eina_Hash_Tuple "const Eina_Hash_Tuple"
88 86
89 ctypedef struct Eina_Iterator: 87 ctypedef struct Eina_Iterator:
90 Eina_Bool (*next)(Eina_Iterator *it, void **data) 88 Eina_Bool (*next)(Eina_Iterator *it, void **data)
@@ -93,37 +91,36 @@ cdef extern from "Eina.h":
93 91
94 ctypedef struct Eina_Log_Domain: 92 ctypedef struct Eina_Log_Domain:
95 int level # Max level to log 93 int level # Max level to log
96 const_char *domain_str # Formatted string with color to print 94 const char *domain_str # Formatted string with color to print
97 const_char *name # Domain name 95 const char *name # Domain name
98 size_t namelen # strlen(name) 96 size_t namelen # strlen(name)
99 ctypedef Eina_Log_Domain const_Eina_Log_Domain "const Eina_Log_Domain"
100 97
101 #################################################################### 98 ####################################################################
102 # Other typedefs 99 # Other typedefs
103 # 100 #
104 ctypedef int (*Eina_Compare_Cb)(const_void *data1, const_void *data2) 101 ctypedef int (*Eina_Compare_Cb)(const void *data1, const void *data2)
105 ctypedef void (*Eina_Free_Cb)(void *data) 102 ctypedef void (*Eina_Free_Cb)(void *data)
106 ctypedef void (*Eina_Log_Print_Cb)(const_Eina_Log_Domain *d, 103 ctypedef void (*Eina_Log_Print_Cb)(const Eina_Log_Domain *d,
107 Eina_Log_Level level, 104 Eina_Log_Level level,
108 const_char *file, const_char *fnc, int line, 105 const char *file, const char *fnc, int line,
109 const_char *fmt, void *data, va_list args) 106 const char *fmt, void *data, va_list args)
110 107
111 #################################################################### 108 ####################################################################
112 # Functions 109 # Functions
113 # 110 #
114 Eina_Error eina_error_get() 111 Eina_Error eina_error_get()
115 void eina_error_set(Eina_Error err) 112 void eina_error_set(Eina_Error err)
116 const_char *eina_error_msg_get(Eina_Error error) 113 const char *eina_error_msg_get(Eina_Error error)
117 114
118 Eina_Bool eina_iterator_next(Eina_Iterator *iterator, void **data) 115 Eina_Bool eina_iterator_next(Eina_Iterator *iterator, void **data)
119 void eina_iterator_free(Eina_Iterator *iterator) 116 void eina_iterator_free(Eina_Iterator *iterator)
120 117
121 Eina_Stringshare *eina_stringshare_add_length(const_char *str, unsigned int slen) 118 Eina_Stringshare *eina_stringshare_add_length(const char *str, unsigned int slen)
122 Eina_Stringshare *eina_stringshare_add(const_char *str) 119 Eina_Stringshare *eina_stringshare_add(const char *str)
123 void eina_stringshare_del(Eina_Stringshare *str) 120 void eina_stringshare_del(Eina_Stringshare *str)
124 Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str) 121 Eina_Stringshare *eina_stringshare_ref(Eina_Stringshare *str)
125 int eina_stringshare_strlen(Eina_Stringshare *str) 122 int eina_stringshare_strlen(Eina_Stringshare *str)
126 Eina_Bool eina_stringshare_replace(Eina_Stringshare **p_str, const_char *news) 123 Eina_Bool eina_stringshare_replace(Eina_Stringshare **p_str, const char *news)
127 124
128 Eina_List *eina_list_free(Eina_List *list) 125 Eina_List *eina_list_free(Eina_List *list)
129 Eina_List *eina_list_append(Eina_List *list, void *data) 126 Eina_List *eina_list_append(Eina_List *list, void *data)
@@ -163,9 +160,9 @@ cdef extern from "Eina.h":
163 unsigned int eina_list_count(Eina_List *list) 160 unsigned int eina_list_count(Eina_List *list)
164 161
165 Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb) 162 Eina_Hash *eina_hash_string_superfast_new(Eina_Free_Cb data_free_cb)
166 Eina_Bool eina_hash_add(Eina_Hash *hash, const_void *key, const_void *data) 163 Eina_Bool eina_hash_add(Eina_Hash *hash, const void *key, const void *data)
167 Eina_Bool eina_hash_del(Eina_Hash *hash, const_void *key, const_void *data) 164 Eina_Bool eina_hash_del(Eina_Hash *hash, const void *key, const void *data)
168 void *eina_hash_find(Eina_Hash *hash, const_void *key) 165 void *eina_hash_find(Eina_Hash *hash, const void *key)
169 166
170 void eina_log_threads_enable() 167 void eina_log_threads_enable()
171 void eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data) 168 void eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data)
@@ -174,21 +171,21 @@ cdef extern from "Eina.h":
174 Eina_Bool eina_log_main_thread_check() 171 Eina_Bool eina_log_main_thread_check()
175 void eina_log_function_disable_set(Eina_Bool disabled) 172 void eina_log_function_disable_set(Eina_Bool disabled)
176 Eina_Bool eina_log_function_disable_get() 173 Eina_Bool eina_log_function_disable_get()
177 void eina_log_domain_level_set(const_char *domain_name, int level) 174 void eina_log_domain_level_set(const char *domain_name, int level)
178 int eina_log_domain_level_get(const_char *domain_name) 175 int eina_log_domain_level_get(const char *domain_name)
179 int eina_log_domain_registered_level_get(int domain) 176 int eina_log_domain_registered_level_get(int domain)
180 int eina_log_domain_register(const_char *name, const_char *color) 177 int eina_log_domain_register(const char *name, const char *color)
181 void eina_log_domain_unregister(int domain) 178 void eina_log_domain_unregister(int domain)
182 void eina_log_print(int domain, 179 void eina_log_print(int domain,
183 Eina_Log_Level level, 180 Eina_Log_Level level,
184 const_char *file, 181 const char *file,
185 const_char *fnc, 182 const char *fnc,
186 int line, 183 int line,
187 const_char *fmt, 184 const char *fmt,
188 ...) 185 ...)
189 186
190 void EINA_LOG_DOM_CRIT(int DOM, const_char *fmt, ...) 187 void EINA_LOG_DOM_CRIT(int DOM, const char *fmt, ...)
191 void EINA_LOG_DOM_ERR(int DOM, const_char *fmt, ...) 188 void EINA_LOG_DOM_ERR(int DOM, const char *fmt, ...)
192 void EINA_LOG_DOM_WARN(int DOM, const_char *fmt, ...) 189 void EINA_LOG_DOM_WARN(int DOM, const char *fmt, ...)
193 void EINA_LOG_DOM_INFO(int DOM, const_char *fmt, ...) 190 void EINA_LOG_DOM_INFO(int DOM, const char *fmt, ...)
194 void EINA_LOG_DOM_DBG(int DOM, const_char *fmt, ...) 191 void EINA_LOG_DOM_DBG(int DOM, const char *fmt, ...)