all: update attributes to use new syntax

This commit is contained in:
Joe C 2023-11-15 16:16:01 +11:00 committed by GitHub
parent dd81cb98c6
commit 757929392e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
739 changed files with 2982 additions and 2982 deletions

View file

@ -40,7 +40,7 @@ fn (err ArgsCountError) msg() string {
// It should be called manually in functions that use Flags,
// and are marked with [manualfree]. After you call .free() on
// a Flag instance, you should NOT use that instance any more.
[unsafe]
@[unsafe]
fn (mut f Flag) free() {
unsafe {
f.name.free()
@ -102,7 +102,7 @@ pub mut:
// marked with `[manualfree]`, otherwise, it is called automatically
// in programs, compiled with `-autofree`. Note: you should NOT use the
// instance over which you have called .free() for anything after the call.
[unsafe]
@[unsafe]
fn (mut f FlagParser) free() {
unsafe {
for a in f.args {
@ -218,7 +218,7 @@ fn (mut fs FlagParser) add_flag(name string, abbr u8, usage string, desc string)
//
// - the name, usage are registered
// - found arguments and corresponding values are removed from args list
[manualfree]
@[manualfree]
fn (mut fs FlagParser) parse_value(longhand string, shorthand u8) []string {
full := '--${longhand}'
defer {