summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-25 13:42:44 +0800
committerPo Lu <luangruo@yahoo.com>2022-04-25 13:42:44 +0800
commitc6809e97e4e74a3d29c69eab86aad7de9fcd3293 (patch)
tree201b572c37392eb204caca9a4b45e36bc81d5258 /src/nsfns.m
parent45372fb1f4862a94b57dee2c5ac0cc870d589de4 (diff)
downloademacs-c6809e97e4e74a3d29c69eab86aad7de9fcd3293.tar.gz
emacs-c6809e97e4e74a3d29c69eab86aad7de9fcd3293.tar.bz2
emacs-c6809e97e4e74a3d29c69eab86aad7de9fcd3293.zip
Get rid of autorelease warnings during building on GNUstep
* src/emacs.c (decode_env_path): * src/nsfns.m (ns_appkit_version_str): * src/nsterm.m (ns_term_shutdown): Setup autorelease when objects might be autoreleased during building.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index f3dc235b893..cff31f7fe0e 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -891,7 +891,10 @@ static Lisp_Object
ns_appkit_version_str (void)
{
NSString *tmp;
+ Lisp_Object string;
+ NSAutoreleasePool *autorelease;
+ autorelease = [[NSAutoreleasePool alloc] init];
#ifdef NS_IMPL_GNUSTEP
tmp = [NSString stringWithFormat:@"gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION)];
#elif defined (NS_IMPL_COCOA)
@@ -901,7 +904,10 @@ ns_appkit_version_str (void)
#else
tmp = [NSString initWithUTF8String:@"ns-unknown"];
#endif
- return [tmp lispString];
+ string = [tmp lispString];
+ [autorelease release];
+
+ return string;
}