Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
6e734860
Commit
6e734860
authored
Oct 09, 2014
by
Steven Kabbes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add static_assert that ARC is enabled
parent
f6e2a81d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/source/ObjcGenerator.scala
src/source/ObjcGenerator.scala
+5
-0
No files found.
src/source/ObjcGenerator.scala
View file @
6e734860
...
...
@@ -99,6 +99,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
})
writeObjcFile
(
enumTranslatorName
(
ident
),
origin
,
refs
.
body
,
w
=>
{
w
.
wl
(
s
"static_assert(__has_feature(objc_arc), "
+
q
(
"Djinni requires ARC to be enabled for this file"
)
+
");"
)
w
.
wl
w
.
wl
(
s
"@implementation "
+
self
+
"Translator"
)
w
.
wl
w
.
wl
(
s
"+ ($self)cpp${name}ToObjc${name}:($cppSelf)${argName}"
)
...
...
@@ -251,6 +253,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
})
writeObjcFile
(
bodyName
(
cppExtName
),
origin
,
refs
.
body
,
w
=>
{
w
.
wl
(
s
"static_assert(__has_feature(objc_arc), "
+
q
(
"Djinni requires ARC to be enabled for this file"
)
+
");"
)
w
.
wl
w
.
wl
(
s
"@implementation $cppExtSelf"
)
w
.
wl
w
.
wl
(
s
"- (id)initWithCpp:(const std::shared_ptr<$cppName> &)cppRef"
)
...
...
@@ -443,6 +447,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
writeObjcFile
(
bodyName
(
objcName
),
origin
,
refs
.
body
,
w
=>
{
if
(
r
.
consts
.
nonEmpty
)
generateObjcConstants
(
w
,
r
.
consts
,
noBaseSelf
)
w
.
wl
(
s
"static_assert(__has_feature(objc_arc), "
+
q
(
"Djinni requires ARC to be enabled for this file"
)
+
");"
)
w
.
wl
w
.
wl
(
s
"@implementation $self"
)
w
.
wl
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment