Re: PATCH: Remove unnecessary type casts
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-08 01:32:04 CET
Philip Martin wrote:
I think it is a good idea. I have not checked the places that retrieve the ultimate data structure field, but I looked at the callers and callee of this function svn_fs__str_to_dbt. Most or all of its callers are passing a constant string, and its callee expects a constant string. This function in the middle is the odd one out.
The further type-munging that takes place inside the callee svn_fs__set_dbt is probably due to historical lack of "const" in the BDB data structure. The data field must be logically constant, else svn_fs__set_dbt would be wrong in accepting a pointer-to-const, and the callers of svn_fs__str_to_dbt would be wrong in supplying constant data.
Does that make sense?
- Julian
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.