discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GWorkspace porting troubles


From: Nicola Pero
Subject: Re: GWorkspace porting troubles
Date: Sat, 27 Oct 2001 19:30:41 +0100 (BST)

On Sat, 27 Oct 2001 LHelldorf@kabel.de wrote:

> Here I had some troubles with the macros RETAIN, ASSIGN, RELEASE, 
> TEST_RELEASE and AUTORELEASE since those don't exist on Mac OS X.

already posted a header but seem to have been ignored - posting again

/* GNUstep.h - macros to make easier to port gnustep apps to macos-x
   Copyright (C) 2001 Free Software Foundation, Inc.

   Written by: Nicola Pero <n.pero@mi.flashnet.it>
   Date: March, October 2001
   
   This file is part of GNUstep.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.
   
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.
   
   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
   */ 

#ifndef __GNUSTEP_GNUSTEP_H_INCLUDED_
# define __GNUSTEP_GNUSTEP_H_INCLUDED_
#
# ifndef GNUSTEP
#
#  define AUTORELEASE(X) [X autorelease]
#  define TEST_AUTORELEASE(X) [X autorelease]
#
#  define RELEASE(X) [X release]
#  define TEST_RELEASE(X) [X release]
#
#  define RETAIN(X) [X retain]
#  define TEST_RETAIN(X) [X retain]
#
#  define ASSIGN(X,Y) ({\
id __GNUSTEP_X = (id)X; \
X = [Y retain]; \
[__GNUSTEP_X release]; \
})
#
#  define ASSIGNCOPY(X,Y) ASSIGN (X, [[Y copy] autorelease]);
#
#  define DESTROY(X) ASSIGN (X, nil)
#
#  define CREATE_AUTORELEASE_POOL(X) \
NSAutoreleasePool *(X) = [NSAutoreleasePool new]
#
#  define _(X) NSLocalizedString (X, nil)
#
#  define __(X) X
#
#  define NSLocalizedStaticString(X, Y) X
#
# endif /* GNUSTEP */
#
#endif /* __GNUSTEP_GNUSTEP_H_INCLUDED_ */




reply via email to

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