Skip to content

lunatik: promote pushoptinteger to a shared helper - #736

Open
lneto wants to merge 1 commit into
masterfrom
claude_pushoptinteger
Open

lunatik: promote pushoptinteger to a shared helper#736
lneto wants to merge 1 commit into
masterfrom
claude_pushoptinteger

Conversation

@lneto

@lneto lneto commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

luaskb defined its own pushoptinteger — a generic "push an integer, or nil" Lua-stack helper with nothing skb-specific about it. Move it to lunatik.h as lunatik_pushoptinteger, alongside the other push helpers (lunatik_pushstring), so it is shared rather than re-defined per module; luaskb's ifindex, vlan, and connmark now use it.

No behavior change — the expansion is the same (the macro arguments are parenthesized).

connmark exercises the macro on both branches (the value and the nil when no conntrack is associated); the skb suite covers it, 3/3.

luaskb defined its own pushoptinteger; move it to lunatik.h as
lunatik_pushoptinteger so any module can push an optional integer
(the value, or nil) through one helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lneto
lneto force-pushed the claude_pushoptinteger branch from 627d6a2 to f42ef10 Compare August 20, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant