diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kross/python/cxx | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kross/python/cxx')
-rw-r--r-- | lib/kross/python/cxx/Objects.hxx | 16 | ||||
-rw-r--r-- | lib/kross/python/cxx/PyCXX.html | 14 | ||||
-rw-r--r-- | lib/kross/python/cxx/cxxsupport.cxx | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.hxx index 41648320..900a347b 100644 --- a/lib/kross/python/cxx/Objects.hxx +++ b/lib/kross/python/cxx/Objects.hxx @@ -54,7 +54,7 @@ namespace Py // The purpose of this class is to serve as the most general kind of // Python object, for the purpose of writing C++ extensions in Python // Objects hold a PyObject* which they own. This pointer is always a - // valid pointer to a Python object. In children we must maintain this behavior. + // valid pointer to a Python object. In tqchildren we must maintain this behavior. // // Instructions on how to make your own class MyType descended from Object: // (0) Pick a base class, either Object or perhaps SeqBase<T> or MapBase<T>. @@ -1470,8 +1470,8 @@ namespace Py // Python strings return strings as individual elements. // I'll try having a class Char which is a String of length 1 // - typedef std::basic_string<Py_UNICODE> unicodestring; - extern Py_UNICODE unicode_null_string[1]; + typedef std::basic_string<Py_UNICODE> tqunicodestring; + extern Py_UNICODE tqunicode_null_string[1]; class Char: public Object { @@ -1535,7 +1535,7 @@ namespace Py return *this; } - Char& operator= (const unicodestring& v) + Char& operator= (const tqunicodestring& v) { set(PyUnicode_FromUnicode (const_cast<Py_UNICODE*>(v.data()),1), true); return *this; @@ -1650,7 +1650,7 @@ namespace Py static_cast<int>( v.length() ) ), true ); return *this; } - String& operator= (const unicodestring& v) + String& operator= (const tqunicodestring& v) { set( PyUnicode_FromUnicode( const_cast<Py_UNICODE*>( v.data() ), static_cast<int>( v.length() ) ), true ); @@ -1706,16 +1706,16 @@ namespace Py } } - unicodestring as_unicodestring() const + tqunicodestring as_tqunicodestring() const { if( isUnicode() ) { - return unicodestring( PyUnicode_AS_UNICODE( ptr() ), + return tqunicodestring( PyUnicode_AS_UNICODE( ptr() ), static_cast<size_type>( PyUnicode_GET_SIZE( ptr() ) ) ); } else { - throw TypeError("can only return unicodestring from Unicode object"); + throw TypeError("can only return tqunicodestring from Unicode object"); } } }; diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html index 566974c1..7213ad70 100644 --- a/lib/kross/python/cxx/PyCXX.html +++ b/lib/kross/python/cxx/PyCXX.html @@ -1,7 +1,7 @@ <html> <head> -<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> +<meta HTTP-ETQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <title>Writing Python Extensions in C++</title> <style> H1, H2, H3, H4 {color: #000099; @@ -62,7 +62,7 @@ integrates Python with C++ in these ways: </p> <p>Download PyCXX from <a href="http://sourceforge.net/projects/cxx/">http://sourceforge.net/projects/cxx/</a>.</p> -<p>The distribution layout is:</p> +<p>The distribution tqlayout is:</p> <table> <tr><th>Directory</th><th>Description</th></tr> <tr><td class=code>.</td><td>Makefile for Unix and Windows, Release documentation</td> @@ -303,7 +303,7 @@ returned by such a function, you need to know if the function returns you an <i> or <i>unowned</i> reference. Unowned references are unusual but there are some cases where unowned references are returned.</p> -<p>Usually, <cite>Object</cite> and its children acquire a new reference when constructed from a +<p>Usually, <cite>Object</cite> and its tqchildren acquire a new reference when constructed from a <cite>PyObject *</cite>. This is usually not the right behavior if the reference comes from one of the Python C API calls.</p> @@ -1188,8 +1188,8 @@ sequence.</p> <td class=code>as_std_string() const</td> </tr> <tr> - <td class=code>unicodestring</td> - <td class=code>as_unicodestring() const</td> + <td class=code>tqunicodestring</td> + <td class=code>as_tqunicodestring() const</td> </tr> </table> @@ -1571,7 +1571,7 @@ converted to a standard string which is passed to std::ostream& operator< <p>The Python exception facility and the C++ exception facility can be merged via the use of try/catch blocks in the bodies of extension objects and module functions.</p> -<h3>Class Exception and its children</h3> +<h3>Class Exception and its tqchildren</h3> <p>A set of classes is provided. Each is derived from class Exception, and represents a particular sort of Python exception, such as IndexError, RuntimeError, ValueError. Each of @@ -1612,7 +1612,7 @@ classes are shown here.</p> </tr> <tr> <td class=code></td> - <td>Constructors for other children of class Exception</td> + <td>Constructors for other tqchildren of class Exception</td> </tr> <tr> <td class=code> </td> diff --git a/lib/kross/python/cxx/cxxsupport.cxx b/lib/kross/python/cxx/cxxsupport.cxx index 61329b60..b7bcaa0a 100644 --- a/lib/kross/python/cxx/cxxsupport.cxx +++ b/lib/kross/python/cxx/cxxsupport.cxx @@ -6,7 +6,7 @@ #include "Objects.hxx" namespace Py { -Py_UNICODE unicode_null_string[1] = { 0 }; +Py_UNICODE tqunicode_null_string[1] = { 0 }; Type Object::type () const { |