Update stdlib to use struct member docs from #2427 and other small changes (#2473)

* Doc comment improvements

* update `compression/qoi.c3` to use const enums

* revert sweeping doc comment changes that impacted readability for now

* Some tweaks.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Book-reader
2025-09-20 04:41:32 +12:00
committed by GitHub
parent b03ae8bb17
commit a6d33ec4af
19 changed files with 201 additions and 143 deletions

View File

@@ -52,8 +52,10 @@ union EpollData
struct EpollEvent @packed
{
uint events; /* Epoll events */
EpollData data; /* User data variable */
<* Epoll events *>
uint events;
<* User data variable *>
EpollData data;
}
struct EpollParams
@@ -62,7 +64,7 @@ struct EpollParams
ushort busy_poll_budget;
char prefer_busy_poll;
/* pad the struct to a multiple of 64bits */
<* pad the struct to a multiple of 64bits *>
char __pad;
}

View File

@@ -33,19 +33,21 @@ struct SubProcess
bitstruct SubProcessOptions : int
{
// Combine stdout and stderr to the same file
<* Combine stdout and stderr to the same file *>
bool combined_stdout_stderr;
// Child process should inherit env variables of parent process
<* Child process should inherit env variables of parent process *>
bool inherit_environment;
// Enable async reading of stdout/stderr before completion
<* Enable async reading of stdout/stderr before completion *>
bool read_async;
// Spawn child process without window if supported
<* Spawn child process without window if supported *>
bool no_window;
// Search for program names in the PATH variable. Always enabled on Windows.
// Note: this will **not** search for paths in any provided custom environment
// and instead uses the PATH of the spawning process.
<*
Search for program names in the PATH variable. Always enabled on Windows.
Note: this will **not** search for paths in any provided custom environment
and instead uses the PATH of the spawning process.
*>
bool search_user_path;
// Inherit the parent's stdin, stdout, and stderr handles instead of creating pipes
<* Inherit the parent's stdin, stdout, and stderr handles instead of creating pipes *>
bool inherit_stdio;
}

View File

@@ -31,9 +31,12 @@ struct Win32_WIN32_FIND_DATAW
Win32_DWORD dwReserved1;
Win32_WCHAR[260] cFileName;
Win32_WCHAR[14] cAlternateFileName;
Win32_DWORD dwFileType; // Obsolete. Do not use.
Win32_DWORD dwCreatorType; // Obsolete. Do not use
Win32_WORD wFinderFlags; // Obsolete. Do not use
<* Obsolete. Do not use. *>
Win32_DWORD dwFileType;
<* Obsolete. Do not use *>
Win32_DWORD dwCreatorType;
<* Obsolete. Do not use *>
Win32_WORD wFinderFlags;
}
alias Win32_LPWIN32_FIND_DATAW = Win32_WIN32_FIND_DATAW*;

View File

@@ -15,23 +15,30 @@ alias Win32_PMEM_EXTENDED_PARAMETER_TYPE = Win32_MEM_EXTENDED_PARAMETER_TYPE;
enum Win32_MEM_EXTENDED_PARAMETER_ATTRIBUTE : const Win32_DWORD64
{
NONPAGED = 0x02, // The allocation is non-pageable.
NONPAGED_LARGE = 0x08, // The allocation is mapped using large pages.
NONPAGED_HUGE = 0x10, // The allocation is mapped using huge pages.
EC_CODE = 0x40, // The allocation will contain emulation-compatible (EC) code.
<* The allocation is non-pageable. *>
NONPAGED = 0x02,
<* The allocation is mapped using large pages. *>
NONPAGED_LARGE = 0x08,
<* The allocation is mapped using huge pages. *>
NONPAGED_HUGE = 0x10,
<* The allocation will contain emulation-compatible (EC) code. *>
EC_CODE = 0x40,
}
struct Win32_MEM_EXTENDED_PARAMETER
{
Win32_MEM_EXTENDED_PARAMETER_TYPE type;
union
{
Win32_MEM_EXTENDED_PARAMETER_ATTRIBUTE attribute; // If type is ATTRIBUTE_FLAGS
Win32_DWORD64 nodeNumber; // If type is NUMA_NODE
Win32_PVOID pointer; // If type is ADDRESS_REQUIREMENTS
Win32_SIZE_T size;
Win32_HANDLE handle;
Win32_DWORD uLong;
}
union
{
<* If type is ATTRIBUTE_FLAGS *>
Win32_MEM_EXTENDED_PARAMETER_ATTRIBUTE attribute;
<* If type is NUMA_NODE *>
Win32_DWORD64 nodeNumber;
<* If type is ADDRESS_REQUIREMENTS *>
Win32_PVOID pointer;
Win32_SIZE_T size;
Win32_HANDLE handle;
Win32_DWORD uLong;
}
}
alias Win32_PMEM_EXTENDED_PARAMETER = Win32_MEM_EXTENDED_PARAMETER*;
alias Win32_PMEM_EXTENDED_PARAMETER = Win32_MEM_EXTENDED_PARAMETER*;