|
|
@@ -54,28 +54,28 @@ PUBLISHED:
|
|
|
INLINE static Encoding get_default_encoding();
|
|
|
MAKE_PROPERTY(default_encoding, get_default_encoding, set_default_encoding);
|
|
|
|
|
|
-#if defined(CPPPARSER)
|
|
|
- PY_EXTEND(void set_text(PyObject *text));
|
|
|
- PY_EXTEND(void set_text(PyObject *text, Encoding encoding));
|
|
|
-#else // CPPPARSER
|
|
|
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
|
|
|
+ EXTEND void set_text(PyObject *text);
|
|
|
+ EXTEND void set_text(PyObject *text, Encoding encoding);
|
|
|
+#else
|
|
|
INLINE void set_text(const std::string &text);
|
|
|
INLINE void set_text(const std::string &text, Encoding encoding);
|
|
|
-#endif // CPPPARSER
|
|
|
+#endif
|
|
|
INLINE void clear_text();
|
|
|
INLINE bool has_text() const;
|
|
|
|
|
|
void make_upper();
|
|
|
void make_lower();
|
|
|
|
|
|
-#if defined(CPPPARSER)
|
|
|
- PY_EXTEND(PyObject *get_text() const);
|
|
|
- PY_EXTEND(PyObject *get_text(Encoding encoding) const);
|
|
|
- PY_EXTEND(void append_text(PyObject *text));
|
|
|
-#else // CPPPARSER
|
|
|
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
|
|
|
+ EXTEND PyObject *get_text() const;
|
|
|
+ EXTEND PyObject *get_text(Encoding encoding) const;
|
|
|
+ EXTEND void append_text(PyObject *text);
|
|
|
+#else
|
|
|
INLINE std::string get_text() const;
|
|
|
INLINE std::string get_text(Encoding encoding) const;
|
|
|
INLINE void append_text(const std::string &text);
|
|
|
-#endif // CPPPARSER
|
|
|
+#endif
|
|
|
INLINE void append_unicode_char(char32_t character);
|
|
|
INLINE size_t get_num_chars() const;
|
|
|
INLINE int get_unicode_char(size_t index) const;
|
|
|
@@ -108,19 +108,19 @@ PUBLISHED:
|
|
|
std::wstring get_wtext_as_ascii() const;
|
|
|
bool is_wtext() const;
|
|
|
|
|
|
-#if defined(CPPPARSER)
|
|
|
- PY_EXTEND(static PyObject *encode_wchar(char32_t ch, Encoding encoding));
|
|
|
- PY_EXTEND(INLINE PyObject *encode_wtext(const std::wstring &wtext) const);
|
|
|
- PY_EXTEND(static PyObject *encode_wtext(const std::wstring &wtext, Encoding encoding));
|
|
|
- PY_EXTEND(INLINE PyObject *decode_text(PyObject *text) const);
|
|
|
- PY_EXTEND(static PyObject *decode_text(PyObject *text, Encoding encoding));
|
|
|
-#else // CPPPARSER
|
|
|
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
|
|
|
+ EXTEND static PyObject *encode_wchar(char32_t ch, Encoding encoding);
|
|
|
+ EXTEND INLINE PyObject *encode_wtext(const std::wstring &wtext) const;
|
|
|
+ EXTEND static PyObject *encode_wtext(const std::wstring &wtext, Encoding encoding);
|
|
|
+ EXTEND INLINE PyObject *decode_text(PyObject *text) const;
|
|
|
+ EXTEND static PyObject *decode_text(PyObject *text, Encoding encoding);
|
|
|
+#else
|
|
|
static std::string encode_wchar(char32_t ch, Encoding encoding);
|
|
|
INLINE std::string encode_wtext(const std::wstring &wtext) const;
|
|
|
static std::string encode_wtext(const std::wstring &wtext, Encoding encoding);
|
|
|
INLINE std::wstring decode_text(const std::string &text) const;
|
|
|
static std::wstring decode_text(const std::string &text, Encoding encoding);
|
|
|
-#endif // CPPPARSER
|
|
|
+#endif
|
|
|
|
|
|
MAKE_PROPERTY(text, get_text, set_text);
|
|
|
|