feat: add bytes.indexOf, server.acceptBatch, server.pendingCount, stdin data callback, and coverage/valgrind make targets

Implement `bytesIndexOf` foreign function supporting optional start offset for searching byte sequences. Add `serverAcceptBatch` and `serverPendingCount` to net module for batch accepting connections and querying pending queue size. Refactor `stdinFileTimerCallback` to pass read bytes to Wren callback instead of null, with separate handling for EOF. Introduce `coverage_64bit` build config with gcov flags, plus `coverage`, `valgrind`, `clean-coverage`, and `publish` phony targets in Makefile. Fix memory leak in regex by nullifying freed pointers on allocation failure.
This commit is contained in:
2026-01-26 11:29:25 +00:00
parent 62b60cce36
commit 38de4da87d
24 changed files with 392 additions and 74 deletions
+9
View File
@@ -87,6 +87,15 @@ ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -std=c99
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g
ALL_LDFLAGS += $(LDFLAGS)
else ifeq ($(config),coverage_64bit)
TARGETDIR = ../../bin
TARGET = $(TARGETDIR)/wren_cli_cov
OBJDIR = obj/64bit/Coverage
DEFINES += -DDEBUG -DWREN_PROFILE_ENABLED -D_GNU_SOURCE
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g --coverage -O0 -std=c99
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -g --coverage -O0
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 --coverage
else
$(error "invalid configuration $(config)")
endif