Skip to content

Commit 738e1f8

Browse files
committed
Throw exception if any subclassed object uses init method atm.
1 parent 0799e9b commit 738e1f8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/OGObject.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ - (void)dealloc
120120
[super dealloc];
121121
}
122122

123+
- (instancetype)init {
124+
OF_INVALID_INIT_METHOD
125+
}
126+
123127
- (instancetype)initWithGObject:(void *)obj
124128
{
125129
g_assert(G_IS_OBJECT(obj));

tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ run:
3434
CPPFLAGS += -I../src \
3535
-DPROG_SUFFIX=\"${PROG_SUFFIX}\"
3636

37-
LIBS := -lobjfwtest \
37+
LIBS := -lobjfwtest \
3838
${TESTS_LIBS} \
3939
${LIBS}
4040

0 commit comments

Comments
 (0)