Changeset 1235 for pjproject/trunk/pjlib/src/pj/timer.c
- Timestamp:
- Apr 30, 2007 9:03:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/timer.c
r669 r1235 256 256 pj_timer_entry **new_heap = 0; 257 257 258 new_heap = pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); 258 new_heap = (pj_timer_entry**) 259 pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); 259 260 memcpy(new_heap, ht->heap, ht->max_size * sizeof(pj_timer_entry*)); 260 261 //delete [] this->heap_; … … 264 265 265 266 new_timer_ids = 0; 266 new_timer_ids = pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); 267 new_timer_ids = (pj_timer_id_t*) 268 pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); 267 269 268 270 memcpy( new_timer_ids, ht->timer_ids, ht->max_size * sizeof(pj_timer_id_t)); … … 371 373 372 374 /* Allocate timer heap data structure from the pool */ 373 ht = pj_pool_alloc(pool, sizeof(pj_timer_heap_t));375 ht = PJ_POOL_ALLOC_T(pool, pj_timer_heap_t); 374 376 if (!ht) 375 377 return PJ_ENOMEM; … … 387 389 388 390 // Create the heap array. 389 ht->heap = pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); 391 ht->heap = (pj_timer_entry**) 392 pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); 390 393 if (!ht->heap) 391 394 return PJ_ENOMEM; 392 395 393 396 // Create the parallel 394 ht->timer_ids = pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); 397 ht->timer_ids = (pj_timer_id_t *) 398 pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); 395 399 if (!ht->timer_ids) 396 400 return PJ_ENOMEM;
Note: See TracChangeset
for help on using the changeset viewer.