~barcc/ubuntu/saucy/pyicu/lp1200419

« back to all changes in this revision

Viewing changes to transliterator.cpp

  • Committer: Package Import Robot
  • Author(s): Jakub Wilk, Bernd Zeimetz, Jakub Wilk
  • Date: 2011-11-13 12:07:46 UTC
  • mfrom: (3.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111113120746-20jj2w42dzz6xozt
Tags: 1.3-1
* Team upload.

[ Bernd Zeimetz ]
* Migrate to dh_python2 (closes: #635633).

[ Jakub Wilk ]
* New upstream version.
  + Fix compatiblity with ICU 4.8 (closes: #628584).
  + Rewrite platform-definitions-fix.dpatch from scratch.
  + Revert upstream change to make ICUtzinfo a heap type.
* Bump standards version to 3.9.2 (no changes needed).
* Don't override shared library dependency information for libpython2.X; the
  exension modules aren't linked to it anyway.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ====================================================================
2
 
 * Copyright (c) 2009-2010 Open Source Applications Foundation.
 
2
 * Copyright (c) 2009-2011 Open Source Applications Foundation.
3
3
 *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a
5
5
 * copy of this software and associated documentation files (the "Software"),
56
56
        self->object = NULL;
57
57
    }
58
58
 
59
 
    self->ob_type->tp_free((PyObject *) self);
 
59
    Py_TYPE(self)->tp_free((PyObject *) self);
60
60
}
61
61
 
62
62
DECLARE_STRUCT(UTransPosition, t_utransposition, UTransPosition,
110
110
 
111
111
/* PythonTransliterator */
112
112
 
113
 
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PythonTransliterator)
 
113
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PythonTransliterator);
114
114
 
115
115
PythonTransliterator::PythonTransliterator(t_transliterator *self,
116
 
                                           UnicodeString& id) :
 
116
                                           UnicodeString &id) :
117
117
    Transliterator(id, NULL)
118
118
{
119
119
    this->self = self;
121
121
}
122
122
 
123
123
PythonTransliterator::PythonTransliterator(t_transliterator *self,
124
 
                                           UnicodeString& id,
 
124
                                           UnicodeString &id,
125
125
                                           UnicodeFilter *adoptedFilter) :
126
126
    Transliterator(id, adoptedFilter)
127
127
{
154
154
                                               UTransPosition& pos,
155
155
                                               UBool incremental) const
156
156
{
157
 
    if (text.getDynamicClassID() == UnicodeString::getStaticClassID())
 
157
    if (ISINSTANCE(&text, UnicodeString))
158
158
    {
159
159
        PyObject *name = PyString_FromString("handleTransliterate");
160
160
        PyObject *p_text = wrap_UnicodeString((UnicodeString *) &text, 0);