mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
LibC: Manually count stored bytes in mbstate_t
This is probably a bit faster than constantly having to look through all stored bytes. It also helps when we are trying to store actual null bytes.
This commit is contained in:
parent
3c807402b3
commit
06f30943ef
2 changed files with 12 additions and 23 deletions
|
@ -21,6 +21,7 @@ typedef unsigned long int wctype_t;
|
|||
// A zero-initialized mbstate_t struct must be a valid initial state.
|
||||
typedef struct {
|
||||
unsigned char bytes[4];
|
||||
unsigned int stored_bytes;
|
||||
} mbstate_t;
|
||||
|
||||
size_t wcslen(const wchar_t*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue