detached ccdd267

perf(wl): inline typed argument constructors

commit
ccdd267a940e07b9920d3e92eb5941d8827e74b4
author
brice · · 2026-09-30 05:29 UTC
parent
023ffe9
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +21 -7
M wl/wl.go +21 -7
@@ -35,13 +35,6 @@ type (
3535 var (
3636 Connect = wlturbo.Connect
3737 NewFixed = wlturbo.NewFixed
38- ArgUint = wlturbo.ArgUint
39- ArgInt = wlturbo.ArgInt
40- ArgFixed = wlturbo.ArgFixed
41- ArgString = wlturbo.ArgString
42- ArgArray = wlturbo.ArgArray
43- ArgObject = wlturbo.ArgObject
44- ArgFD = wlturbo.ArgFD
4538 NewContext = wlturbo.NewContext
4639 CloseSentFD = wlturbo.CloseSentFD
4740 CheckVersion = wlturbo.CheckVersion
@@ -50,6 +43,27 @@ var (
5043 UnmapMemory = wlturbo.UnmapMemory
5144 )
5245
46+// ArgUint constructs a uint argument.
47+func ArgUint(v uint32) Arg { return wlturbo.ArgUint(v) }
48+
49+// ArgInt constructs an int argument.
50+func ArgInt(v int32) Arg { return wlturbo.ArgInt(v) }
51+
52+// ArgFixed constructs a fixed-point argument.
53+func ArgFixed(v Fixed) Arg { return wlturbo.ArgFixed(v) }
54+
55+// ArgString constructs a string argument borrowed until the request returns.
56+func ArgString(v string) Arg { return wlturbo.ArgString(v) }
57+
58+// ArgArray constructs an array argument borrowed until the request returns.
59+func ArgArray(v []byte) Arg { return wlturbo.ArgArray(v) }
60+
61+// ArgObject constructs an object or new_id argument; nil is sent as 0.
62+func ArgObject(v Object) Arg { return wlturbo.ArgObject(v) }
63+
64+// ArgFD marks a descriptor position; the descriptor travels in Request.FDs.
65+func ArgFD() Arg { return wlturbo.ArgFD() }
66+
5367 // Sentinels for the transport's error classes, so errors.Is works through the
5468 // shim as it does through the root package.
5569 var (
@@ -35,13 +35,6 @@ type (
35 var (35 var (
36 Connect = wlturbo.Connect36 Connect = wlturbo.Connect
37 NewFixed = wlturbo.NewFixed37 NewFixed = wlturbo.NewFixed
38- ArgUint = wlturbo.ArgUint
39- ArgInt = wlturbo.ArgInt
40- ArgFixed = wlturbo.ArgFixed
41- ArgString = wlturbo.ArgString
42- ArgArray = wlturbo.ArgArray
43- ArgObject = wlturbo.ArgObject
44- ArgFD = wlturbo.ArgFD
45 NewContext = wlturbo.NewContext38 NewContext = wlturbo.NewContext
46 CloseSentFD = wlturbo.CloseSentFD39 CloseSentFD = wlturbo.CloseSentFD
47 CheckVersion = wlturbo.CheckVersion40 CheckVersion = wlturbo.CheckVersion
@@ -50,6 +43,27 @@ var (
50 UnmapMemory = wlturbo.UnmapMemory43 UnmapMemory = wlturbo.UnmapMemory
51 )44 )
52 45
46+// ArgUint constructs a uint argument.
47+func ArgUint(v uint32) Arg { return wlturbo.ArgUint(v) }
48+
49+// ArgInt constructs an int argument.
50+func ArgInt(v int32) Arg { return wlturbo.ArgInt(v) }
51+
52+// ArgFixed constructs a fixed-point argument.
53+func ArgFixed(v Fixed) Arg { return wlturbo.ArgFixed(v) }
54+
55+// ArgString constructs a string argument borrowed until the request returns.
56+func ArgString(v string) Arg { return wlturbo.ArgString(v) }
57+
58+// ArgArray constructs an array argument borrowed until the request returns.
59+func ArgArray(v []byte) Arg { return wlturbo.ArgArray(v) }
60+
61+// ArgObject constructs an object or new_id argument; nil is sent as 0.
62+func ArgObject(v Object) Arg { return wlturbo.ArgObject(v) }
63+
64+// ArgFD marks a descriptor position; the descriptor travels in Request.FDs.
65+func ArgFD() Arg { return wlturbo.ArgFD() }
66+
53 // Sentinels for the transport's error classes, so errors.Is works through the67 // Sentinels for the transport's error classes, so errors.Is works through the
54 // shim as it does through the root package.68 // shim as it does through the root package.
55 var (69 var (

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 8

↑↓ moveenter openesc close