File tree Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ buildOptions "debugInfoC" platform="windows"
11
11
// Enable Objective-C integration on apple platforms.
12
12
configuration "appleos" {
13
13
platforms "osx" "ios" "watchos" "tvos" "visionos"
14
-
15
14
targetType "library"
15
+
16
16
dependency "objective-d" version="~>1.0" optional=true default=false
17
17
}
18
18
Original file line number Diff line number Diff line change @@ -157,15 +157,25 @@ public:
157
157
}
158
158
}
159
159
160
- /**
161
- Creates a string from an Objective-C NSString.
162
-
163
- This will release 1 reference from the NSString.
164
- */
165
160
version (Have_objective_d)
166
- this (NSString str) {
167
- this .set_(str.toString());
168
- str.release();
161
+ static if (is (T == char )) {
162
+
163
+ /**
164
+ Creates a string from an Objective-C NSString.
165
+
166
+ This will release 1 reference from the NSString.
167
+ */
168
+ this (NSString str) {
169
+ this .set_(str.toString());
170
+ str.release();
171
+ }
172
+
173
+ /**
174
+ To Objective-C NSString
175
+ */
176
+ NSString toNSString () {
177
+ return NSString.create(ptr);
178
+ }
169
179
}
170
180
171
181
/**
@@ -312,14 +322,6 @@ public:
312
322
*/
313
323
alias toString = toDString;
314
324
315
- /**
316
- To Objective-C NSString
317
- */
318
- version (Have_objective_d)
319
- NSString toNSString () {
320
- return NSString.create(ptr);
321
- }
322
-
323
325
/**
324
326
Set content of string
325
327
*/
You can’t perform that action at this time.
0 commit comments