summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2020-12-21 19:49:04 +0000
committerAlan Third <alan@idiocy.org>2020-12-31 15:38:08 +0000
commitaeb2475816bfdf7e52284fedf693d3f36940652a (patch)
treeeb2bfbbe38d08db6a3b1fc6ab6e8c2769512ed7d
parent77a07a2f8d16e4f3fa8e0ae23b4349919226ce8b (diff)
downloademacs-aeb2475816bfdf7e52284fedf693d3f36940652a.tar.gz
Fix EmacsSurface definitions
* src/nsterm.h: * src/nsterm.m ([EmacsSurface initWithSize:ColorSpace:]): Objective C init methods should init the superclass, and return id.
-rw-r--r--src/nsterm.h2
-rw-r--r--src/nsterm.m6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/nsterm.h b/src/nsterm.h
index a1f7fdc9479..9de41043f9b 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -715,7 +715,7 @@ typedef id instancetype;
IOSurfaceRef lastSurface;
CGContextRef context;
}
-- (EmacsSurface *) initWithSize: (NSSize)s ColorSpace: (CGColorSpaceRef)cs;
+- (id) initWithSize: (NSSize)s ColorSpace: (CGColorSpaceRef)cs;
- (void) dealloc;
- (NSSize) getSize;
- (CGContextRef) getContext;
diff --git a/src/nsterm.m b/src/nsterm.m
index 14eabfd1e65..63f48cd242b 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9526,11 +9526,13 @@ not_in_argv (NSString *arg)
surfaces. */
-- (EmacsSurface *) initWithSize: (NSSize)s
- ColorSpace: (CGColorSpaceRef)cs
+- (id) initWithSize: (NSSize)s
+ ColorSpace: (CGColorSpaceRef)cs
{
NSTRACE ("[EmacsSurface initWithSize:ColorSpace:]");
+ [super init];
+
cache = [[NSMutableArray arrayWithCapacity:3] retain];
size = s;
colorSpace = cs;