Skip to content

Commit

Permalink
Make some private symbols private.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchisnall committed Jan 2, 2019
1 parent cace3a4 commit abf629b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions arc.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ - (void)release;
return tls;
#endif
}
int count = 0;
int poolCount = 0;
static int count = 0;
static int poolCount = 0;
static inline void release(id obj);

/**
Expand Down
2 changes: 1 addition & 1 deletion class_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ PRIVATE void objc_resolve_class_links(void)
}
} while (resolvedClass);
}
void __objc_resolve_class_links(void)
PRIVATE void __objc_resolve_class_links(void)
{
static BOOL warned = NO;
if (!warned)
Expand Down
8 changes: 4 additions & 4 deletions eh_personality.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,19 +533,19 @@ struct thread_data
#ifdef NO_PTHREADS
static __thread struct thread_data thread_data;
#else
void clean_tls(void *td)
static void clean_tls(void *td)
{
struct thread_data *data = td;
}

static pthread_key_t key;
void init_key(void)
static void init_key(void)
{
pthread_key_create(&key, clean_tls);
}
#endif

struct thread_data *get_thread_data(void)
static struct thread_data *get_thread_data(void)
{
#ifndef NO_PTHREADS
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
Expand All @@ -566,7 +566,7 @@ struct thread_data *get_thread_data(void)
#endif
}

struct thread_data *get_thread_data_fast(void)
static struct thread_data *get_thread_data_fast(void)
{
#ifndef NO_PTHREADS
struct thread_data *td = pthread_getspecific(key);
Expand Down
6 changes: 3 additions & 3 deletions hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ typedef struct PREFIX(_table_struct)
struct PREFIX(_table_cell_struct) *table;
} PREFIX(_table);

struct PREFIX(_table_cell_struct) *PREFIX(alloc_cells)(PREFIX(_table) *table, int count)
static struct PREFIX(_table_cell_struct) *PREFIX(alloc_cells)(PREFIX(_table) *table, int count)
{
# if defined(ENABLE_GC) && defined(MAP_TABLE_TYPES_BITMAP)
return GC_CALLOC_EXPLICITLY_TYPED(count,
Expand All @@ -126,7 +126,7 @@ struct PREFIX(_table_cell_struct) *PREFIX(alloc_cells)(PREFIX(_table) *table, in
# endif
}

PREFIX(_table) *PREFIX(_create)(uint32_t capacity)
static PREFIX(_table) *PREFIX(_create)(uint32_t capacity)
{
PREFIX(_table) *table = CALLOC(1, sizeof(PREFIX(_table)));
# ifndef MAP_TABLE_NO_LOCK
Expand All @@ -143,7 +143,7 @@ PREFIX(_table) *PREFIX(_create)(uint32_t capacity)
return table;
}

void PREFIX(_initialize)(PREFIX(_table) **table, uint32_t capacity)
static void PREFIX(_initialize)(PREFIX(_table) **table, uint32_t capacity)
{
#ifdef ENABLE_GC
GC_add_roots(table, table+1);
Expand Down
2 changes: 1 addition & 1 deletion protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static int protocol_hash(const struct objc_protocol *protocol)
static protocol_table *known_protocol_table;
mutex_t protocol_table_lock;

void init_protocol_table(void)
PRIVATE void init_protocol_table(void)
{
protocol_initialize(&known_protocol_table, 128);
INIT_LOCK(protocol_table_lock);
Expand Down
2 changes: 1 addition & 1 deletion sarray2.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const static SparseArray EmptyArray24 = { 24, 0, .data[0 ... 255] = (void*)&Empt
#define base_shift 8
#define base_mask ((1<<base_shift) - 1)

void *EmptyChildForShift(uint32_t shift)
static void *EmptyChildForShift(uint32_t shift)
{
switch(shift)
{
Expand Down

0 comments on commit abf629b

Please sign in to comment.