Skip to content

Commit

Permalink
Hide some mistakenlt external symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Feb 9, 2025
1 parent 48f01b6 commit 5fa8a06
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Source/Additions/GSMime.m
Original file line number Diff line number Diff line change
Expand Up @@ -8285,7 +8285,7 @@ - (BOOL) use8bit
SMTPE_DSN, // delivery status notification extension
} SMTPE;

NSString *
static NSString *
eventText(NSStreamEvent e)
{
if (e == NSStreamEventNone)
Expand All @@ -8303,7 +8303,7 @@ - (BOOL) use8bit
return @"unknown event";
}

NSString *
static NSString *
statusText(NSStreamStatus s)
{
if (s == NSStreamStatusNotOpen) return @"NSStreamStatusNotOpen";
Expand Down
2 changes: 1 addition & 1 deletion Source/GSFFIInvocation.m
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ IMP gs_objc_msg_forward (SEL sel)
return gs_objc_msg_forward2 (nil, sel);
}
#ifdef __GNUSTEP_RUNTIME__
gs_thread_key_t thread_slot_key;
static gs_thread_key_t thread_slot_key;
static struct objc_slot *
gs_objc_msg_forward3(id receiver, SEL op)
{
Expand Down
10 changes: 6 additions & 4 deletions Source/GSICUString.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import <Foundation/NSString.h>
#import <Foundation/NSException.h>
#import "Foundation/NSString.h"
#import "Foundation/NSException.h"
#import "GSPrivate.h"

#if defined(HAVE_UNICODE_UTEXT_H)
#include <unicode/utext.h>
Expand Down Expand Up @@ -30,7 +31,7 @@
* The returned UText object holds a reference to the NSString and accesses its
* contents directly.
*/
UText* UTextInitWithNSString(UText *txt, NSString *str);
UText* UTextInitWithNSString(UText *txt, NSString *str) GS_ATTRIB_PRIVATE;

/**
* Initialises a UText structure with an NSMutableString. If txt is NULL, then
Expand All @@ -43,7 +44,8 @@ UText* UTextInitWithNSString(UText *txt, NSString *str);
* This function returns a mutable UText, and changes made to it will be
* reflected in the underlying NSMutableString.
*/
UText* UTextInitWithNSMutableString(UText *txt, NSMutableString *str);
UText* UTextInitWithNSMutableString(UText *txt, NSMutableString *str)
GS_ATTRIB_PRIVATE;

/**
* GSUTextString is an NSString subclass that is backed by a libicu UText
Expand Down
10 changes: 5 additions & 5 deletions Source/GSICUString.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* Loads a group of characters into the buffer that can be directly accessed by
* users of the UText. This is used for iteration but UText users.
*/
UBool
static UBool
UTextNSStringAccess(UText *ut, int64_t nativeIndex, UBool forward)
{
NSString *str = (NSString*)ut->p;
Expand Down Expand Up @@ -223,7 +223,7 @@
/**
* Copy or move some characters within a UText.
*/
void UTextNSStringCopy(UText *ut,
static void UTextNSStringCopy(UText *ut,
int64_t nativeStart,
int64_t nativeLimit,
int64_t nativeDest,
Expand Down Expand Up @@ -276,7 +276,7 @@ void UTextNSStringCopy(UText *ut,
* Typically, this should not actually copy the underlying storage, because it
* is immutable.
*/
UText*
static UText*
UTextNSStringClone(UText *dest,
const UText *src,
UBool deep,
Expand All @@ -294,7 +294,7 @@ void UTextNSStringCopy(UText *ut,
/**
* Copies the UText object, optionally copying the NSMutableString.
*/
UText*
static UText*
UTextNSMutableStringClone(UText *dest,
const UText *src,
UBool deep,
Expand All @@ -319,7 +319,7 @@ void UTextNSStringCopy(UText *ut,
/**
* Returns the index of the current character in the temporary buffer.
*/
int64_t
static int64_t
UTextNSStringMapOffsetToNative(const UText *ut)
{
return ut->chunkNativeStart + ut->chunkOffset;
Expand Down
4 changes: 2 additions & 2 deletions Source/GSShellSort.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#import "Foundation/NSObjCRuntime.h"
#import "GSSorting.h"

void
static void
_GSShellSort(id *objects,
NSRange sortRange,
id comparisonEntity,
Expand Down Expand Up @@ -121,4 +121,4 @@ + (void) setUnstable
_GSSortUnstable = _GSShellSort;
}
@end

10 changes: 6 additions & 4 deletions Source/GSSorting.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef NSUInteger GSComparisonType;
* GNUstep.
*/
extern void (*_GSSortUnstable)(id *buffer, NSRange range, id comparisonEntity,
GSComparisonType cmprType, void *context);
GSComparisonType cmprType, void *context) GS_ATTRIB_PRIVATE;

/**
* This is the internal prototype of an stable, non-concurrency safe sorting
Expand All @@ -54,7 +54,7 @@ extern void (*_GSSortUnstable)(id *buffer, NSRange range, id comparisonEntity,
* GNUstep.
*/
extern void (*_GSSortStable)(id *buffer, NSRange range, id comparisonEntity,
GSComparisonType cmprType, void *context);
GSComparisonType cmprType, void *context) GS_ATTRIB_PRIVATE;

/**
* This is the internal prototype of an unstable, concurrency safe sorting
Expand All @@ -63,7 +63,8 @@ extern void (*_GSSortStable)(id *buffer, NSRange range, id comparisonEntity,
* GNUstep.
*/
extern void (*_GSSortUnstableConcurrent)(id *buffer, NSRange range,
id comparisonEntity, GSComparisonType cmprType, void *context);
id comparisonEntity, GSComparisonType cmprType, void *context)
GS_ATTRIB_PRIVATE;

/**
* This is the internal prototype of an stable, concurrency safe sorting
Expand All @@ -72,7 +73,8 @@ extern void (*_GSSortUnstableConcurrent)(id *buffer, NSRange range,
* GNUstep.
*/
extern void (*_GSSortStableConcurrent)(id *buffer, NSRange range,
id comparisonEntity, GSComparisonType cmprType, void *context);
id comparisonEntity, GSComparisonType cmprType, void *context)
GS_ATTRIB_PRIVATE;

/**
* GSSortUnstable() uses the above prototypes to provide sorting that does not
Expand Down
2 changes: 1 addition & 1 deletion Source/NSHTTPCookieStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#import "Foundation/NSString.h"
#import "Foundation/NSDistributedNotificationCenter.h"

NSString *objectObserver = @"org.GNUstep.NSHTTPCookieStorage";
static NSString *objectObserver = @"org.GNUstep.NSHTTPCookieStorage";

// Internal data storage
typedef struct {
Expand Down
4 changes: 2 additions & 2 deletions Source/NSObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -608,12 +608,12 @@ static void release_fast(id anObject)
return release_fast_no_destroy(anObject);
}

size_t object_getRetainCount_np_internal(id anObject)
static size_t object_getRetainCount_np_internal(id anObject)
{
return ((obj)anObject)[-1].retained + 1;
}

size_t getRetainCount(id anObject)
static size_t getRetainCount(id anObject)
{
#ifdef __GNUSTEP_RUNTIME__
if (object_getRetainCount_np)
Expand Down
15 changes: 9 additions & 6 deletions Source/cifframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ typedef struct _cifframe_t {

@class NSMutableData;

extern GSCodeBuffer* cifframe_closure(NSMethodSignature *sig, void (*func)());
extern GSCodeBuffer* cifframe_closure(NSMethodSignature *sig,
void (*func)()) GS_ATTRIB_PRIVATE;

extern void cifframe_set_arg(cifframe_t *cframe, int index, void *buffer,
int size);
int size) GS_ATTRIB_PRIVATE;
extern void cifframe_get_arg(cifframe_t *cframe, int index, void *buffer,
int size);
extern void *cifframe_arg_addr(cifframe_t *cframe, int index);
extern BOOL cifframe_decode_arg(const char *type, void* buffer);
extern BOOL cifframe_encode_arg(const char *type, void* buffer);
int size) GS_ATTRIB_PRIVATE;
extern void *cifframe_arg_addr(cifframe_t *cframe, int index) GS_ATTRIB_PRIVATE;
extern BOOL cifframe_decode_arg(const char *type,
void *buffer) GS_ATTRIB_PRIVATE;
extern BOOL cifframe_encode_arg(const char *type,
void *buffer) GS_ATTRIB_PRIVATE;

#endif
2 changes: 1 addition & 1 deletion Source/cifframe.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

/* Best guess at the space needed for a structure, since we don't know
for sure until it's calculated in ffi_prep_cif, which is too late */
int
static int
cifframe_guess_struct_size(ffi_type *stype)
{
int i, size;
Expand Down

0 comments on commit 5fa8a06

Please sign in to comment.