Hi Thomas,
On 9/5/10 8:10 PM, Thomas Mullaly wrote:
Changes since previous attempt:
- Perform lazy allocation/copy of a URI property when the
IUriBuilder_Get* function is called, instead of always allocating when the IUriBuilder is created (addresses Jacek's comments).
- Created helper functions for Get/Set calls to the IUriBuilder to cut
back on code duplication.
- Added a bit flag member to the UriBuilder object, so that it can store
which properties have been changed.
It looks much better now. There is one problem remaining (that I think can be fixed in a follow-up patch):
+ This->modified_props |= Uri_HAS_FRAGMENT; + return set_builder_component(&This->fragment,&This->fragment_len, pwzNewValue, '#');
The modifier_props should be set only on success. To achieve so, I think it would be cleaner to pass a flag to be set to set_buildier_component.
Jacek