emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/ns/performance f6c5b5f: Fix EmacsSurface definitions


From: Alan Third
Subject: scratch/ns/performance f6c5b5f: Fix EmacsSurface definitions
Date: Mon, 21 Dec 2020 14:50:52 -0500 (EST)

branch: scratch/ns/performance
commit f6c5b5f5b9616f48972f579bd65f7153154c5290
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 1f03c4f..5074d60 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -722,7 +722,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 c3ced6b..0237b34 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9628,11 +9628,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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]