Annotation of pkgsrc/inputmethod/scim-python/patches/patch-ac, revision 1.2
1.2 ! obache 1: $NetBSD: patch-ac,v 1.1.1.1 2010/08/08 01:05:04 obache Exp $
1.1 obache 2:
1.2 ! obache 3: * let to cast with appropriate type.
1.1 obache 4:
5: --- src/scim-python-factory.cpp.orig 2008-07-11 04:16:15.000000000 +0000
6: +++ src/scim-python-factory.cpp
1.2 ! obache 7: @@ -130,18 +130,18 @@ PyIMEngineFactory::get_attr_unicode (cha
! 8: if (pValue) {
! 9: if (PyUnicode_Check (pValue)) {
! 10: #if Py_UNICODE_SIZE == 4
! 11: - result = (wchar_t *)PyUnicode_AS_UNICODE (pValue);
! 12: + result = (scim::ucs4_t *)PyUnicode_AS_UNICODE (pValue);
1.1 obache 13: #else
14: gunichar *unistr = g_utf16_to_ucs4 (PyUnicode_AS_UNICODE (pValue),
15: PyUnicode_GET_SIZE (pValue), NULL, NULL, NULL);
16: - result = (wchar_t *) unistr;
1.2 ! obache 17: + result = WideString((scim::ucs4_t *)unistr);
1.1 obache 18: g_free (unistr);
19: #endif
20: }
21: else if (PyString_Check (pValue)) {
22: gunichar *unistr = g_utf8_to_ucs4 (PyString_AsString (pValue),
23: PyString_GET_SIZE (pValue), NULL, NULL, NULL);
24: - result = (wchar_t *)unistr;
1.2 ! obache 25: + result = WideString((scim::ucs4_t *)unistr);
1.1 obache 26: g_free (unistr);
27: }
28: Py_DECREF (pValue);
CVSweb <webmaster@jp.NetBSD.org>