bug-gnustep
[Top][All Lists]
Advanced

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

gnustep-base.dll on mingw


From: Michael Scheibler
Subject: gnustep-base.dll on mingw
Date: Mon, 26 Mar 2001 13:14:06 +0200

In NSObject.h there are some functions which need a correct declaration for
use as a DLL.

GS_EXPORT NSObject *NSAllocateObject(Class aClass, unsigned extraBytes,
NSZone *zone);
GS_EXPORT void NSDeallocateObject(NSObject *anObject);
GS_EXPORT NSObject *NSCopyObject(NSObject *anObject, unsigned extraBytes,
NSZone *zone);

GS_EXPORT BOOL NSShouldRetainWithZone(NSObject *anObject, NSZone
*requestedZone);
GS_EXPORT unsigned NSExtraRefCount(id anObject);
GS_EXPORT void NSIncrementExtraRefCount(id anObject);
GS_EXPORT BOOL NSDecrementExtraRefCountWasZero(id anObject);


I am using GS_EXPORT now, but I don't know if it would be better to use the
other variable GS_DECLARE which has to be defined differently in
NSObjCRuntime.h:

old way:
#if BUILD_libgnustep_base_DLL
#  define GS_EXPORT  __declspec(dllexport)
#elif libgnustep_base_ISDLL
#  define GS_EXPORT  extern __declspec(dllimport)
#else
#  define GS_EXPORT extern
#endif
#define GS_DECLARE

new way:
#if BUILD_libgnustep_base_DLL
#  define GS_EXPORT  __declspec(dllexport)
#  define GS_DECLARE __declspec(dllexport)
#elif libgnustep_base_ISDLL
#  define GS_EXPORT  extern __declspec(dllimport)
#  define GS_DECLARE __declspec(dllimport)
#else
#  define GS_EXPORT extern
#  define GS_DECLARE
#endif


Michael




reply via email to

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