- Timestamp:
- 05/11/08 14:16:28 (3 months ago)
- Files:
-
- libwired/trunk/libwired/misc/wi-pool.c (modified) (4 diffs)
- libwired/trunk/libwired/misc/wi-pool.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libwired/trunk/libwired/misc/wi-pool.c
r5412 r5513 72 72 _wi_pool_array_t *array; 73 73 74 wi_string_t *context; 74 75 wi_hash_t *locations; 75 76 }; … … 246 247 247 248 if(!stack) { 248 wi_log_warn(WI_STR("Orphaned pool in thread %@"), wi_thread_current_thread());249 wi_log_warn(WI_STR("Orphaned pool in thread %@"), thread); 249 250 250 251 return; … … 274 275 static void _wi_pool_invalid_abort(wi_pool_t *pool, wi_runtime_instance_t *instance) { 275 276 if(pool->locations) { 276 WI_ASSERT(0, "%p is not a valid instance: 0x%x ( autoreleased at %@)",277 WI_ASSERT(0, "%p is not a valid instance: 0x%x (context = %@, autoreleased at %@)", 277 278 instance, 278 279 WI_RUNTIME_BASE(instance)->magic, 280 pool->context, 279 281 wi_hash_data_for_key(pool->locations, instance)); 280 282 } else { 281 WI_ASSERT(0, "%p is not a valid instance: 0x%x ",283 WI_ASSERT(0, "%p is not a valid instance: 0x%x (context = %@)", 282 284 instance, 283 WI_RUNTIME_BASE(instance)->magic); 285 WI_RUNTIME_BASE(instance)->magic, 286 pool->context); 284 287 } 285 288 } … … 297 300 wi_uinteger_t wi_pool_count(wi_pool_t *pool) { 298 301 return pool->count; 302 } 303 304 305 306 #pragma mark - 307 308 void wi_pool_set_context(wi_pool_t *pool, wi_string_t *context) { 309 wi_retain(context); 310 wi_release(pool->context); 311 312 pool->context = context; 299 313 } 300 314 libwired/trunk/libwired/misc/wi-pool.h
r5412 r5513 48 48 WI_EXPORT wi_uinteger_t wi_pool_count(wi_pool_t *); 49 49 50 WI_EXPORT void wi_pool_set_context(wi_pool_t *, wi_string_t *); 51 50 52 WI_EXPORT wi_runtime_instance_t * _wi_autorelease(wi_runtime_instance_t *, const char *, wi_uinteger_t); 51 53
