[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/performance 63f9d8f 5/5: Fix EmacsSurface definitions
From: |
Alan Third |
Subject: |
scratch/ns/performance 63f9d8f 5/5: Fix EmacsSurface definitions |
Date: |
Sun, 27 Dec 2020 12:20:25 -0500 (EST) |
branch: scratch/ns/performance
commit 63f9d8f86f3ae7a4863577080044ad52923d853c
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Fix EmacsSurface definitions
* src/nsterm.h:
* src/nsterm.m ([EmacsSurface initWithSize:ColorSpace:]): Objective C
init methods should init the superclass, and return id.
---
src/nsterm.h | 2 +-
src/nsterm.m | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h
index f6a1b04..d21aa74 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -716,7 +716,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 f456227..30b92e0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9525,11 +9525,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;