From 0b928133e718d27e01b3e70846fb4457af2e0b31 Mon Sep 17 00:00:00 2001 From: lmp Date: Sat, 18 Nov 2023 11:18:57 +0100 Subject: [PATCH] all: update to new attribute syntax `[attr]` -> `@[attr]` --- android/ndk/compiler_flags.v | 6 +++--- android/ndk/ndk.v | 6 +++--- android/screenshot.v | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/ndk/compiler_flags.v b/android/ndk/compiler_flags.v index 816a2d34..4d6032aa 100644 --- a/android/ndk/compiler_flags.v +++ b/android/ndk/compiler_flags.v @@ -10,13 +10,13 @@ const ( ndk_supported_cpp_features = ['rtti', 'exceptions', 'no-rtti', 'no-exceptions'] ) -[params] +@[params] pub struct FlagConfig { pub: pic bool = true // TODO debug bool = true // false = release platform_level int = 21 - arch string [required] + arch string @[required] neon bool arm_mode string = 'thumb' // or 'arm' lang CompilerLanguageType = .c @@ -29,7 +29,7 @@ pub: pub struct FlagGen { pub: - ndk_version string [required] + ndk_version string @[required] } pub struct FlagResult { diff --git a/android/ndk/ndk.v b/android/ndk/ndk.v index 27154238..3ad224c6 100644 --- a/android/ndk/ndk.v +++ b/android/ndk/ndk.v @@ -205,7 +205,7 @@ fn min_version_supported_by_vab() string { } // host_arch returns the host architecture string for the platform which `vab` was compiled on. -[inline] +@[inline] pub fn host_arch() string { $if linux { return 'linux-x86_64' @@ -224,7 +224,7 @@ pub fn host_arch() string { // arch_to_instruction_set maps `arch` to an instruction set // Example: assert ndk.arch_to_instruction_set('x86') == 'i686' -[inline] +@[inline] pub fn arch_to_instruction_set(arch string) string { return match arch { 'armeabi-v7a' { 'armv7a' } @@ -237,7 +237,7 @@ pub fn arch_to_instruction_set(arch string) string { // bin_path returns the absolute path to the host architecture's `bin` directory. // As an example: `/path/to/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin`. -[inline] +@[inline] pub fn bin_path(ndk_version string) string { return os.join_path(root_version(ndk_version), 'toolchains', 'llvm', 'prebuilt', host_arch(), 'bin') diff --git a/android/screenshot.v b/android/screenshot.v index 9e60e520..478bd7bd 100644 --- a/android/screenshot.v +++ b/android/screenshot.v @@ -8,7 +8,7 @@ import vab.util as vabutil import vab.android.env import vab.android.util -[params] +@[params] pub struct SimpleScreenshotOptions { pub: verbosity int