[pyicu-dev] [PATCH] Add correct namespace declarations everywhere
Steven R. Loomis
srl at icu-project.org
Tue Sep 11 11:17:15 PDT 2007
Why are you compiling with -DU_USING_ICU_NAMESPACE=0?
You can build ICU with that same option and then it will be consistent.
On 11 Set 2007, at 11:15, Fredrik Roubert wrote:
> On 9/11/07, Steven R. Loomis <srl at icu-project.org> wrote:
>
>> You should automatically get 'using namespace icu;' in C++, it's in
>> uversion.h under U_NAMESPACE_USE
>>
>> I'm not sure why it is necessary to say icu::Locale explicitly.
>
> If you try compiling PyICU, without my patch, against icu4c-3_8_d02
> with the flag -DU_USING_ICU_NAMESPACE=0, then you'll get compile
> errors like these:
>
> common.h:138: error: 'UnicodeString' was not declared in this scope
>
>> Can you explain what you mean by 'additional namespace
>> declarations' ?
>
> I was referring to U_NAMESPACE_QUALIFIER being added in front of
> UnicodeString in unistr.h in ICU 3.8, but thanks to your question I
> took a closer look at it and realized that that wasn't the real source
> of my problem, but instead that I was using the
> -DU_USING_ICU_NAMESPACE=0 flag (which probably is a rarely tested use
> case).
in any event your patch should probably use the U_NAMESPACE_QUALIFIER
instead of the static string icu::
It's not a 'rarely tested case', it's that you are requesting to not
specify the ICU namespace and it is doing as you requested.
So, i think the patch should not be needed.
-s
More information about the pyicu-dev
mailing list