/* Encode the Unicode codepoint @c and return the number of bytes used. */
typedef unsigned (*encode_codepoint_fn)(u32 c, u8 *out);
-static inline unsigned
+static forceinline unsigned
utf8_decode_codepoint(const u8 *in, size_t remaining, bool validate, u32 *c_ret)
{
if (likely(in[0] < 0x80)) { /* U+0...U+7F */
return 1;
}
-static inline unsigned
+static forceinline unsigned
utf8_encode_codepoint(u32 c, u8 *out)
{
if (likely(c < 0x80)) {
return 4;
}
-static inline unsigned
+static forceinline unsigned
utf16le_decode_codepoint(const u8 *in, size_t remaining, bool validate,
u32 *c_ret)
{
return min(remaining, 2);
}
-static inline unsigned
+static forceinline unsigned
utf16le_encode_codepoint(u32 c, u8 *out)
{
if (likely(c < 0x10000)) {
* If the input string is malformed, return @ilseq_err with errno set to EILSEQ.
* If out of memory, return WIMLIB_ERR_NOMEM with errno set to ENOMEM.
*/
-static inline int
+static forceinline int
convert_string(const u8 * const in, const size_t in_nbytes,
u8 **out_ret, size_t *out_nbytes_ret,
int ilseq_err,