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
0832f814
Commit
0832f814
authored
Oct 10, 2014
by
j4cbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17 from skabbes/fix/assert_arc
static_assert that ARC is enabled
parents
f6e2a81d
28a34a25
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
20 additions
and
0 deletions
+20
-0
example/generated-src/objc/TXSItemList.mm
example/generated-src/objc/TXSItemList.mm
+1
-0
example/generated-src/objc/TXSSortItemsCppProxy.mm
example/generated-src/objc/TXSSortItemsCppProxy.mm
+2
-0
src/source/ObjcGenerator.scala
src/source/ObjcGenerator.scala
+5
-0
test-suite/generated-src/objc/DBClientReturnedRecord.mm
test-suite/generated-src/objc/DBClientReturnedRecord.mm
+1
-0
test-suite/generated-src/objc/DBCppExceptionCppProxy.mm
test-suite/generated-src/objc/DBCppExceptionCppProxy.mm
+2
-0
test-suite/generated-src/objc/DBMapListRecord.mm
test-suite/generated-src/objc/DBMapListRecord.mm
+1
-0
test-suite/generated-src/objc/DBMapRecord.mm
test-suite/generated-src/objc/DBMapRecord.mm
+1
-0
test-suite/generated-src/objc/DBNestedCollection.mm
test-suite/generated-src/objc/DBNestedCollection.mm
+1
-0
test-suite/generated-src/objc/DBPrimitiveList.mm
test-suite/generated-src/objc/DBPrimitiveList.mm
+1
-0
test-suite/generated-src/objc/DBRecordWithDerivings.mm
test-suite/generated-src/objc/DBRecordWithDerivings.mm
+1
-0
test-suite/generated-src/objc/DBRecordWithNestedDerivings.mm
test-suite/generated-src/objc/DBRecordWithNestedDerivings.mm
+1
-0
test-suite/generated-src/objc/DBSetRecord.mm
test-suite/generated-src/objc/DBSetRecord.mm
+1
-0
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
+2
-0
No files found.
example/generated-src/objc/TXSItemList.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
TXSItemList
@implementation
TXSItemList
...
...
example/generated-src/objc/TXSSortItemsCppProxy.mm
View file @
0832f814
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
#include <exception>
#include <exception>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
TXSSortItemsCppProxy
@implementation
TXSSortItemsCppProxy
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<::
textsort
::
SortItems
>
&
)
cppRef
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<::
textsort
::
SortItems
>
&
)
cppRef
...
...
src/source/ObjcGenerator.scala
View file @
0832f814
...
@@ -99,6 +99,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
...
@@ -99,6 +99,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
})
})
writeObjcFile
(
enumTranslatorName
(
ident
),
origin
,
refs
.
body
,
w
=>
{
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
(
s
"@implementation "
+
self
+
"Translator"
)
w
.
wl
w
.
wl
w
.
wl
(
s
"+ ($self)cpp${name}ToObjc${name}:($cppSelf)${argName}"
)
w
.
wl
(
s
"+ ($self)cpp${name}ToObjc${name}:($cppSelf)${argName}"
)
...
@@ -251,6 +253,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
...
@@ -251,6 +253,8 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
})
})
writeObjcFile
(
bodyName
(
cppExtName
),
origin
,
refs
.
body
,
w
=>
{
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
(
s
"@implementation $cppExtSelf"
)
w
.
wl
w
.
wl
w
.
wl
(
s
"- (id)initWithCpp:(const std::shared_ptr<$cppName> &)cppRef"
)
w
.
wl
(
s
"- (id)initWithCpp:(const std::shared_ptr<$cppName> &)cppRef"
)
...
@@ -443,6 +447,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
...
@@ -443,6 +447,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
writeObjcFile
(
bodyName
(
objcName
),
origin
,
refs
.
body
,
w
=>
{
writeObjcFile
(
bodyName
(
objcName
),
origin
,
refs
.
body
,
w
=>
{
if
(
r
.
consts
.
nonEmpty
)
generateObjcConstants
(
w
,
r
.
consts
,
noBaseSelf
)
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
w
.
wl
(
s
"@implementation $self"
)
w
.
wl
(
s
"@implementation $self"
)
w
.
wl
w
.
wl
...
...
test-suite/generated-src/objc/DBClientReturnedRecord.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBClientReturnedRecord
@implementation
DBClientReturnedRecord
...
...
test-suite/generated-src/objc/DBCppExceptionCppProxy.mm
View file @
0832f814
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include <exception>
#include <exception>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBCppExceptionCppProxy
@implementation
DBCppExceptionCppProxy
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<
CppException
>
&
)
cppRef
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<
CppException
>
&
)
cppRef
...
...
test-suite/generated-src/objc/DBMapListRecord.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBMapListRecord
@implementation
DBMapListRecord
...
...
test-suite/generated-src/objc/DBMapRecord.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBMapRecord
@implementation
DBMapRecord
...
...
test-suite/generated-src/objc/DBNestedCollection.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBNestedCollection
@implementation
DBNestedCollection
...
...
test-suite/generated-src/objc/DBPrimitiveList.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBPrimitiveList
@implementation
DBPrimitiveList
...
...
test-suite/generated-src/objc/DBRecordWithDerivings.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBRecordWithDerivings
@implementation
DBRecordWithDerivings
...
...
test-suite/generated-src/objc/DBRecordWithNestedDerivings.mm
View file @
0832f814
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBRecordWithNestedDerivings
@implementation
DBRecordWithNestedDerivings
...
...
test-suite/generated-src/objc/DBSetRecord.mm
View file @
0832f814
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBSetRecord
@implementation
DBSetRecord
...
...
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
View file @
0832f814
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include <exception>
#include <exception>
#include <utility>
#include <utility>
static_assert
(
__has_feature
(
objc_arc
),
"Djinni requires ARC to be enabled for this file"
);
@implementation
DBTestHelpersCppProxy
@implementation
DBTestHelpersCppProxy
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<
TestHelpers
>
&
)
cppRef
-
(
id
)
initWithCpp
:(
const
std
::
shared_ptr
<
TestHelpers
>
&
)
cppRef
...
...
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