You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Takashi Sato <se...@lans-tv.com> on 2007/11/21 12:32:28 UTC

How about accepting NULL as cleanup function

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