To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=68929
------- Additional comments from [EMAIL PROTECTED] Mon Aug 28 12:00:30 -0700
2006 -------
Hi Stefan; so - sure, we don't use the (empty anyway) memory barrier macro, I
guess that is broken.
The dual definition / enumeration macro is common in cases where people need to
accurately maintain large lists of string/enum/attribute information, it's also
(presuambly) easy enough to understand. [ cf. eg. gcc for a ton of examples ].
> Why not have as interface an enum of propname values together with an (inline)
> accessor function rtl::OUString getPropname(enum Propname), getting rid of
> all the macro stuff.
I just wanted to use what was there (macros), with some trivial changes. I have
to maintain a large patch set, you don't; sounds like a nice change though as it
goes up-stream.
Wrt. the double-check-locking pattern, I read the instance.hxx and concluded it
was an abomination of template driven evil, that *looks* like it does something
8x more inefficient than what is required; and (apparently) includes a load of
parameters that should be defaults:
T * getInstance()
{
return rtl_Instance< T, Init, ::osl::MutexGuard,
::osl::GetGlobalMutex >::create(
Init(), ::osl::GetGlobalMutex());
}
If templates are so clever - why do we need to pass such a bunch of crud to them
? :-) Why can't we do:
PtrArray *getInstance()
{
return rtl_Instance< PtrArray >;
}
I guess passing 5 other parameters, including a function etc. etc. is highly
flexible, but appears sufficiently unpleasant to have put me off :-) is it
really not possible to bin them, and/or use sensible defaults to make this
easier to read, adapt in future etc. ?
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]