Hide a ton of symbols that shouldn't be exported

Still not catching all of them. This really should just be compiled with
-fvisilibilty=hidden and friends.
This commit is contained in:
David Benjamin 2011-03-28 21:35:25 -04:00
parent 0a65366e4b
commit 518ab2e413
7 changed files with 21 additions and 49 deletions

View File

@ -138,7 +138,7 @@ static void __attribute__((destructor)) log_file_sentinel(void)
}
void npw_print_indent(FILE *fp)
static void npw_print_indent(FILE *fp)
{
static const char blanks[] = " ";
const int blanks_length = sizeof(blanks) - 1;

View File

@ -42,7 +42,7 @@ extern void npobject_associate(NPObject *npobj, NPObjectInfo *npobj_info) attrib
extern bool npobject_bridge_new(void) attribute_hidden;
extern void npobject_bridge_destroy(void) attribute_hidden;
extern NPClass npclass_bridge;
extern NPClass npclass_bridge attribute_hidden;
extern int npclass_handle_Invalidate(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_HasMethod(rpc_connection_t *connection) attribute_hidden;

View File

@ -102,37 +102,37 @@ NPW_InitializeFuncs (NPNetscapeFuncs *mozilla_funcs,
MIN (sizeof (g_plugin_funcs), plugin_funcs->size));
}
void *
attribute_hidden void *
NPN_MemAlloc (uint32_t size)
{
return g_mozilla_funcs.memalloc(size);
}
void
attribute_hidden void
NPN_MemFree (void *ptr)
{
g_mozilla_funcs.memfree(ptr);
}
uint32_t
attribute_hidden uint32_t
NPN_MemFlush (uint32_t size)
{
return g_mozilla_funcs.memflush(size);
}
NPObject *
attribute_hidden NPObject *
NPN_RetainObject (NPObject *npobj)
{
return g_mozilla_funcs.retainobject(npobj);
}
void
void attribute_hidden
NPN_ReleaseObject (NPObject *npobj)
{
g_mozilla_funcs.releaseobject(npobj);
}
void
void attribute_hidden
NPN_ReleaseVariantValue (NPVariant *var)
{
g_mozilla_funcs.releasevariantvalue(var);

View File

@ -211,19 +211,19 @@ struct _NPW_Identifier
/* Create identifier from an integer */
NPW_Identifier
NPW_CreateIntIdentifier (int32_t value);
NPW_CreateIntIdentifier (int32_t value) attribute_hidden;
/* Create identifier from a string (that is copied) */
NPW_Identifier
NPW_CreateStringIdentifier (const char *str);
NPW_CreateStringIdentifier (const char *str) attribute_hidden;
/* Create identifier from a string (that is now owned by the identifier) */
NPW_Identifier
NPW_CreateStringIdentifierSink (char *str);
NPW_CreateStringIdentifierSink (char *str) attribute_hidden;
/* Destroy identifier */
void
NPW_DestroyIdentifier (NPW_Identifier id);
NPW_DestroyIdentifier (NPW_Identifier id) attribute_hidden;
/* Check whether identifier is an integer */
static inline bool

View File

@ -22,28 +22,28 @@
#define NPW_MALLOC_H
void *
NPW_MemAlloc (uint32_t size);
NPW_MemAlloc (uint32_t size) attribute_hidden;
void *
NPW_MemAlloc0 (uint32_t size);
NPW_MemAlloc0 (uint32_t size) attribute_hidden;
void *
NPW_MemAllocCopy (uint32_t size, const void *ptr);
NPW_MemAllocCopy (uint32_t size, const void *ptr) attribute_hidden;
void
NPW_MemFree (void *ptr);
NPW_MemFree (void *ptr) attribute_hidden;
void *
NPW_Debug_MemAlloc (uint32_t size, const char *file, int lineno);
NPW_Debug_MemAlloc (uint32_t size, const char *file, int lineno) attribute_hidden;
void *
NPW_Debug_MemAlloc0 (uint32_t size, const char *file, int lineno);
NPW_Debug_MemAlloc0 (uint32_t size, const char *file, int lineno) attribute_hidden;
void *
NPW_Debug_MemAllocCopy (uint32_t size, const void *ptr, const char *file, int lineno);
NPW_Debug_MemAllocCopy (uint32_t size, const void *ptr, const char *file, int lineno) attribute_hidden;
void
NPW_Debug_MemFree (void *ptr, const char *file, int lineno);
NPW_Debug_MemFree (void *ptr, const char *file, int lineno) attribute_hidden;
#define NPW_MemNew(type, n) \
((type *) NPW_MemAlloc ((n) * sizeof (type)))

View File

@ -1791,34 +1791,6 @@ int rpc_connection_add_method_descriptors(rpc_connection_t *connection, const rp
return RPC_ERROR_NO_ERROR;
}
// Remove a user-defined method callback (common code)
int rpc_connection_remove_method_descriptor(rpc_connection_t *connection, int id)
{
D(bug("rpc_connection_remove_method_descriptor\n"));
if (connection == NULL)
return RPC_ERROR_CONNECTION_NULL;
return rpc_map_remove(connection->methods, id);
}
// Remove user-defined method callbacks (server side)
int rpc_connection_remove_method_descriptors(rpc_connection_t *connection, const rpc_method_descriptor_t *descs, int n_descs)
{
D(bug("rpc_connection_remove_method_descriptors\n"));
if (connection == NULL)
return RPC_ERROR_CONNECTION_NULL;
while (--n_descs >= 0) {
int error = rpc_connection_remove_method_descriptor(connection, descs[n_descs].id);
if (error != RPC_ERROR_NO_ERROR)
return error;
}
return RPC_ERROR_NO_ERROR;
}
/* ====================================================================== */
/* === Remote Procedure Call (method invocation) === */

View File

@ -129,6 +129,6 @@ extern bool rpc_method_in_invoke(rpc_connection_t *connection) attribute_hidden;
typedef void (*rpc_error_callback_t)(rpc_connection_t *connection, void *user_data);
// Set error callback for a connection
void rpc_connection_set_error_callback(rpc_connection_t *connection, rpc_error_callback_t callback, void *callback_data);
void rpc_connection_set_error_callback(rpc_connection_t *connection, rpc_error_callback_t callback, void *callback_data) attribute_hidden;
#endif /* RPC_H */