diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-04-30 21:03:32 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-04-30 21:03:32 +0000 |
commit | 9bfdd11aac28c934ce580880837cce948d9be10a (patch) | |
tree | e0414666d0e0b7b7ac99adb0125acf7b988b8428 /pjlib/src/pj/timer.c | |
parent | 25830dbc54149caeb660f1f379e547ed9eb09159 (diff) |
Initial Symbian integration to trunk for pjlib
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1235 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/timer.c')
-rw-r--r-- | pjlib/src/pj/timer.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c index e96a3e54..1e28b926 100644 --- a/pjlib/src/pj/timer.c +++ b/pjlib/src/pj/timer.c @@ -255,7 +255,8 @@ static void grow_heap(pj_timer_heap_t *ht) pj_timer_entry **new_heap = 0; - new_heap = pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); + new_heap = (pj_timer_entry**) + pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); memcpy(new_heap, ht->heap, ht->max_size * sizeof(pj_timer_entry*)); //delete [] this->heap_; ht->heap = new_heap; @@ -263,7 +264,8 @@ static void grow_heap(pj_timer_heap_t *ht) // Grow the array of timer ids. new_timer_ids = 0; - new_timer_ids = pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); + new_timer_ids = (pj_timer_id_t*) + pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); memcpy( new_timer_ids, ht->timer_ids, ht->max_size * sizeof(pj_timer_id_t)); @@ -370,7 +372,7 @@ PJ_DEF(pj_status_t) pj_timer_heap_create( pj_pool_t *pool, size += 2; /* Allocate timer heap data structure from the pool */ - ht = pj_pool_alloc(pool, sizeof(pj_timer_heap_t)); + ht = PJ_POOL_ALLOC_T(pool, pj_timer_heap_t); if (!ht) return PJ_ENOMEM; @@ -386,12 +388,14 @@ PJ_DEF(pj_status_t) pj_timer_heap_create( pj_pool_t *pool, ht->auto_delete_lock = 0; // Create the heap array. - ht->heap = pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); + ht->heap = (pj_timer_entry**) + pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); if (!ht->heap) return PJ_ENOMEM; // Create the parallel - ht->timer_ids = pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); + ht->timer_ids = (pj_timer_id_t *) + pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); if (!ht->timer_ids) return PJ_ENOMEM; |