(trunk libT) have tr_strndup() take an ssize_t instead of an int

This commit is contained in:
Charles Kerr
2009-01-18 15:15:41 +00:00
parent 5ea9bcacbc
commit b6588f442b
2 changed files with 2 additions and 3 deletions

View File

@@ -637,8 +637,7 @@ tr_buildPath( const char *first_element, ... )
****/
char*
tr_strndup( const void * in,
int len )
tr_strndup( const void * in, ssize_t len )
{
char * out = NULL;

View File

@@ -302,7 +302,7 @@ static TR_INLINE void* tr_memdup( const void * src, int byteCount )
( (struct_type *) realloc ( ( mem ), ( (size_t) sizeof ( struct_type ) ) * ( ( size_t) ( n_structs ) ) ) )
/** @param in is a void* so that callers can pass in both signed & unsigned without a cast */
char* tr_strndup( const void * in, int len ) TR_GNUC_MALLOC;
char* tr_strndup( const void * in, ssize_t len ) TR_GNUC_MALLOC;
/** @param in is a void* so that callers can pass in both signed & unsigned without a cast */
static TR_INLINE char* tr_strdup( const void * in )