summary refs log tree commit diff stats
path: root/tests/ccgbugs/tmangle_field.nim
diff options
context:
space:
mode:
authorArchar Gelod <60652075+Archargelod@users.noreply.github.com>2024-08-14 22:35:40 +0800
committerGitHub <noreply@github.com>2024-08-14 22:35:40 +0800
commit2a046e648756b6a36acf580c9c0289319cd697d7 (patch)
tree2002d17fc5b24648e610ca1f2814325cb0cc30d7 /tests/ccgbugs/tmangle_field.nim
parenta33e2b76ae4355db61ecf51aec0ced7690c975ef (diff)
downloadNim-2a046e648756b6a36acf580c9c0289319cd697d7.tar.gz
better examples for std/inotify (#23415)
Previous example wouldn't run unless `std/posix` was imported and it
wasn't mentioned anywhere in the docs.

Other changes in the example:
- replaced magic number with constant `MaxWatches` .
- changed seq buffer to array, because length is already constant +
pointer is a bit nicer: `addr seq[0]` vs `addr arr`
- added example for getting a `cstring` name value from `InotifyEvent`
struct with explicit cast.
- added a bit more description to `inotify_init1` (copied from `man
inotify(7)`)

---------

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Diffstat (limited to 'tests/ccgbugs/tmangle_field.nim')
0 files changed, 0 insertions, 0 deletions