blob: e20d75c204251c7c3e2294f872b25320d66282a4 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/src/roxml_mem.c
2+++ b/src/roxml_mem.c
3@@ -20,7 +20,7 @@ ROXML_STATIC ROXML_INT inline void roxml
4 memory_cell_t *ptr = &head_cell;
5 memory_cell_t *to_delete = NULL;
6
7- while ((ptr->prev != NULL) && (ptr->prev->id != pthread_self()))
8+ while ((ptr->prev != NULL) && (ptr->prev->id != (unsigned long int)pthread_self()))
9 ptr = ptr->prev;
10
11 if (ptr->prev == NULL)
12@@ -135,7 +135,7 @@ ROXML_INT void *roxml_malloc(int size, i
13 cell->next->prev = cell;
14 cell = cell->next;
15 cell->type = type;
16- cell->id = pthread_self();
17+ cell->id = (unsigned long int)pthread_self();
18 cell->occ = size;
19 cell->ptr = calloc(num, size);
20 head_cell.prev = cell;
21--- a/src/roxml_utils.h
22+++ b/src/roxml_utils.h
23@@ -48,7 +48,7 @@ ROXML_STATIC_INLINE ROXML_INT int roxml_
24 #else /* CONFIG_XML_THREAD_SAFE==1 */
25 ROXML_STATIC_INLINE ROXML_INT unsigned long int roxml_thread_id(node_t *n)
26 {
27- return pthread_self();
28+ return (unsigned long int)pthread_self();
29 }
30
31 ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n)