From ad8f799703a4bf8d87741890ba831856af2dd145 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 28 Feb 2026 20:47:23 +0900 Subject: container/std: rename seccomp types Aliases will be kept until 0.4. Signed-off-by: Ophestra --- container/std/seccomp.go | 16 ++++++++++------ container/std/types.go | 8 ++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 container/std/types.go (limited to 'container/std') diff --git a/container/std/seccomp.go b/container/std/seccomp.go index 17f36706..e808e61f 100644 --- a/container/std/seccomp.go +++ b/container/std/seccomp.go @@ -7,24 +7,28 @@ import ( type ( // ScmpUint is equivalent to C.uint. - ScmpUint uint32 + // + // Deprecated: This type has been renamed to Uint and will be removed in 0.4. + ScmpUint = Uint // ScmpInt is equivalent to C.int. - ScmpInt int32 + // + // Deprecated: This type has been renamed to Int and will be removed in 0.4. + ScmpInt = Int // ScmpSyscall represents a syscall number passed to libseccomp via [NativeRule.Syscall]. - ScmpSyscall ScmpInt + ScmpSyscall Int // ScmpErrno represents an errno value passed to libseccomp via [NativeRule.Errno]. - ScmpErrno ScmpInt + ScmpErrno Int // ScmpCompare is equivalent to enum scmp_compare; - ScmpCompare ScmpUint + ScmpCompare Uint // ScmpDatum is equivalent to scmp_datum_t. ScmpDatum uint64 // ScmpArgCmp is equivalent to struct scmp_arg_cmp. ScmpArgCmp struct { // argument number, starting at 0 - Arg ScmpUint `json:"arg"` + Arg Uint `json:"arg"` // the comparison op, e.g. SCMP_CMP_* Op ScmpCompare `json:"op"` diff --git a/container/std/types.go b/container/std/types.go new file mode 100644 index 00000000..e1b53063 --- /dev/null +++ b/container/std/types.go @@ -0,0 +1,8 @@ +package std + +type ( + // Uint is equivalent to C.uint. + Uint uint32 + // Int is equivalent to C.int. + Int int32 +) -- cgit v1.3.1