Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Daco's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Nov 2, 2023
1 parent 363acd1 commit 2bdfda3
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions test/native_objc_test/static_func_test.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Expand All @@ -14,29 +13,6 @@ + (instancetype)newWithCounter:(int32_t*) _counter;
- (instancetype)initWithCounter:(int32_t*) _counter;
- (void)setCounter:(int32_t*) _counter;
- (void)dealloc;
@end
@implementation StaticFuncTestObj

+ (instancetype)newWithCounter:(int32_t*) _counter {
return [[StaticFuncTestObj alloc] initWithCounter: _counter];
}

- (instancetype)initWithCounter:(int32_t*) _counter {
counter = _counter;
++*counter;
return [super init];
}

- (void)setCounter:(int32_t*) _counter {
counter = _counter;
++*counter;
}

- (void)dealloc {
if (counter != nil) --*counter;
[super dealloc];
}

@end

StaticFuncTestObj* staticFuncOfObject(StaticFuncTestObj* a) {
Expand All @@ -62,3 +38,26 @@ IntBlock staticFuncOfBlock(IntBlock a) {
StaticFuncTestObj* a) {
return [a retain];
}


@implementation StaticFuncTestObj
+ (instancetype)newWithCounter:(int32_t*) _counter {
return [[StaticFuncTestObj alloc] initWithCounter: _counter];
}

- (instancetype)initWithCounter:(int32_t*) _counter {
counter = _counter;
++*counter;
return [super init];
}

- (void)setCounter:(int32_t*) _counter {
counter = _counter;
++*counter;
}

- (void)dealloc {
if (counter != nil) --*counter;
[super dealloc];
}
@end

0 comments on commit 2bdfda3

Please sign in to comment.