diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/kross/python/cxx/Objects.hxx | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib/kross/python/cxx/Objects.hxx')
-rw-r--r-- | lib/kross/python/cxx/Objects.hxx | 16 |
1 files changed, 8 insertions, 8 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"); } } }; |