[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: Re: [Kde-bindings] Using i18n
From: Shaheed Haque <srhaque () theiet ! org>
Date: 2013-05-06 8:39:13
Message-ID: CAHAc2jeJiiC8m2-7RpF=-n0yf6_37Bf_EzjXAbcpsc36ud0W2w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Luca,
I already looked :-). Anyway, the SIP code uses this call:
arg = (QString *)sipForceConvertToType(pyarg, sipType_QString,
NULL, SIP_NOT_NONE, &state, &iserr);
But having reviewed the docs at
http://pyqt.sourceforge.net/Docs/sip4/c_api.html, and the
implementation of sip_api_force_convert_to_type()
in
http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c,
all I can tell is that this code has not been changed since 2008. So, I
guess the problem lies deep in the innards of the SIP library where Python
strings are handled.
If my guess is right, then I'm not sure how siplib.c works because I would
thought it would need the same kind of version-dependent hackery I had to
add to the Pate plugin (in utlities.cpp) to handle all the variations in
Python's C API, but all I see is some tests for HAVE_WCHAR_T. AFAIK, that's
not enough, but I expect I have simply not guessed correctly.
Thanks, Shaheed
On 6 May 2013 08:19, Luca Beltrame <lbeltrame@kde.org> wrote:
> In data domenica 5 maggio 2013 16:46:36, Philipp A. ha scritto:
> > i wrote an analysis of the behavior here. It seems that the bug surfaces
> in
> > both python 2 and python 3.
>
> Shaheed, the i18n() calls use custom Python code. Can you take a look at
> kdecore/klocalizedstring.sip in PyKDE4 and see if the code there (only the
> Python C API bits) looks off? I'm not familiar with the Python API enough
> to
> make a guess.
>
> --
> Luca Beltrame - KDE Forums team
> KDE Science supporter
> GPG key ID: 6E1A4E79
>
[Attachment #5 (text/html)]
<div dir="ltr">Hi Luca,<div><br></div><div style>I already looked :-). Anyway, the \
SIP code uses this call:</div><div style><br></div><div style><div> arg \
= (QString *)sipForceConvertToType(pyarg, sipType_QString, NULL, SIP_NOT_NONE, \
&state, &iserr);</div> <div><br></div></div><div style>But having reviewed \
the docs at <a href="http://pyqt.sourceforge.net/Docs/sip4/c_api.html">http://pyqt.sourceforge.net/Docs/sip4/c_api.html</a>, \
and the implementation of <span \
style="color:rgb(0,0,0);font-size:12px">sip_api_force_convert_to_type() in </span><a \
href="http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c">http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c</a>, \
all I can tell is that this code has not been changed since 2008. So, I guess the \
problem lies deep in the innards of the SIP library where Python strings are \
handled.<br> </div><div style><br></div><div style>If my guess is right, then I'm \
not sure how siplib.c works because I would thought it would need the same kind of \
version-dependent hackery I had to add to the Pate plugin (in utlities.cpp) to \
handle all the variations in Python's C API, but all I see is some tests for \
HAVE_WCHAR_T. AFAIK, that's not enough, but I expect I have simply not guessed \
correctly.</div> <div style><br></div><div style>Thanks, Shaheed</div><div \
style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 \
May 2013 08:19, Luca Beltrame <span dir="ltr"><<a href="mailto:lbeltrame@kde.org" \
target="_blank">lbeltrame@kde.org</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">In data domenica 5 maggio 2013 16:46:36, Philipp A. ha \
scritto:<br> <div class="im">> i wrote an analysis of the behavior here. It seems \
that the bug surfaces in<br> > both python 2 and python 3.<br>
<br>
</div>Shaheed, the i18n() calls use custom Python code. Can you take a look at<br>
kdecore/klocalizedstring.sip in PyKDE4 and see if the code there (only the<br>
Python C API bits) looks off? I'm not familiar with the Python API enough to<br>
make a guess.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Luca Beltrame - KDE Forums team<br>
KDE Science supporter<br>
GPG key ID: 6E1A4E79</div></div></blockquote></div><br></div>
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic