mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
The base template for std::char_traits<> has been removed in LLVM 19; specializations are only provided for char, wchar_t, char8_t, char16_t, and char32_t. This had severely impacted GNU APL which derived its UTF8 and UCS string classes from std::basic_string<>. The author had made several attempts to convert these classes to use std::vector<> instead. Carefully cherry-pick required changes so these fixes could be applied on top of version 1.8 as trunk had diverged significantly. Obtained from: upstream (SVN revisions 1823, 1831, and 1837) Reported by: pkg-fallout
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
--- src/CDR_string.hh.orig 2019-06-23 12:39:20 UTC
|
|
+++ src/CDR_string.hh
|
|
@@ -73,7 +73,7 @@ class CDR_string : public std::vector<uint8_t> (public
|
|
|
|
/// return the bytes of this CDR
|
|
const uint8_t * get_items() const
|
|
- { return &front(); }
|
|
+ { return utf8P(&front()); }
|
|
|
|
/// return the header of this CDR
|
|
const CDR_header & header() const
|
|
@@ -92,7 +92,7 @@ class CDR_string : public std::vector<uint8_t> (public
|
|
|
|
/// return the ravel of this CDR
|
|
const uint8_t * ravel() const
|
|
- { return &(*this)[0] + 16 + 4*get_rank(); }
|
|
+ { return utf8P(&(*this)[0] + 16 + 4*get_rank()); }
|
|
|
|
/// return true if this CDR is bool or integer
|
|
bool is_integer() const
|
|
@@ -131,7 +131,7 @@ class CDR_string : public std::vector<uint8_t> (public
|
|
protected:
|
|
/// return 4 bytes of the header (the header is always big endian)
|
|
uint32_t get_4(unsigned int offset) const
|
|
- { return CDR_header::get_be32(&(*this)[0] + offset); }
|
|
+ { return CDR_header::get_be32(utf8P(&(*this)[0] + offset)); }
|
|
};
|
|
|
|
#endif // __CDR_STRING_HH_DEFINED__
|