apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Takashi Sato <se...@lans-tv.com>
Subject How about accepting NULL as cleanup function
Date Wed, 21 Nov 2007 11:32:28 GMT
apr_pool_cleanup_register's 3rd and 4th arguments must not be NULL.
If we want a pool to do nothing at the destruction, we must pass apr_pool_cleanup_null.
apr_pool_userdata_set accepts NULL as cleanup function. I think this is natural and safe.
Al least when APR_POOL_DEBUG enabled there should be some assertion.

Additionally if apr_pool_cleanup_register accepts NULL apr_pool_cleanup_null no longer have
to be a public API.

-- 
Takashi Sato
serai@lans-tv.com

Mime
View raw message