• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

starwing / znet / 41268327138
95%

Build:
DEFAULT BRANCH: master
Ran 01 Nov 2026 03:14AM UTC
Jobs 2
Files 2
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Nov 2026 03:13AM UTC coverage: 94.657% (-0.005%) from 94.662%
41268327138

push

github

starwing
api: drop zn_initialize/zn_deinitialize, init Winsock lazily

The global pair existed only for WSAStartup, and it was the wrong shape: it
also carried the GetQueuedCompletionStatusEx lookup, so an embedder that
already owned Winsock had to call it anyway or silently lose the batched
poll.  XP is not worth keeping either: MSVC and MinGW-w64 both default
_WIN32_WINNT to the newest version (sdkddkver.h: "default to most current"),
so "no version macro" already means Vista+ -- and an explicit
_WIN32_WINNT=0x0501 does not even compile (InetPtonA/InetNtopA sit behind
NTDDI_LONGHORN).

The first zn_newstate() now runs WSAStartup through
INIT_ONCE/InitOnceExecuteOnce: statically initialized, waiters block instead
of polling, exactly once per process.  The callback always returns TRUE and
latches the result in znP_wsaok, so a failed init is not retried on every
state.  Nothing calls WSACleanup (libuv's model: the process exit releases
it), and a failed init makes zn_newstate() return NULL instead of abort().

With XP gone, reaching GetQueuedCompletionStatusEx through GetProcAddress
buys nothing, so the manual typedef, the function pointer and the
one-packet GetQueuedCompletionStatus fallback go too; znB_read calls it
directly and an untested fallback path disappears with them (this also
clears the 80-column typedef exception in notes/refine.md).

Call sites: znet.hpp loses ZSummerEnvironment/ZNPP_DEFINE_ENV, zn_lua.c
loses the module __gc, examples, bench and tests lose their calls.
README.md, README.zh.md and the notes describe the new lifetime.

Verified with notes/gate.sh (macOS kqueue+select, Linux epoll+select,
Windows IOCP cl /W4 /WX), just check-c89, just check-cpp03, just
test-lua, and MinGW-w64 GCC 13.2.0 (C99 / C89 -pedantic-errors / C++03
-pedantic-errors / C++11 all compile; example runs to "exit...").

824 of 927 branches covered (88.89%)

Branch coverage included in aggregate %.

1231 of 1244 relevant lines covered (98.95%)

41172.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 linux - 41268327138.1 01 Nov 2026 03:14AM UTC 2
95.29
GitHub Action Run
2 macos - 41268327138.2 01 Nov 2026 03:14AM UTC 2
91.73
GitHub Action Run
Source Files on build 41268327138
  • Tree
  • List 2
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #41268327138
  • d3915870 on github
  • Prev Build on master (#41265075565)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc