mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Tidied up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22977 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7cf503e096
commit
6d7eae6095
19 changed files with 111 additions and 95 deletions
|
@ -19,7 +19,8 @@
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -607,7 +608,7 @@ objc_mutex_t
|
|||
objc_mutex_allocate(void)
|
||||
{
|
||||
pthread_mutex_t *p;
|
||||
p = (pthread_mutex_t *)calloc(1, sizeof(pthread_mutex_t));
|
||||
p = (pthread_mutex_t *)objc_calloc(1, sizeof(pthread_mutex_t));
|
||||
if (pthread_mutex_init(p, NULL) != 0)
|
||||
{
|
||||
abort();
|
||||
|
@ -623,7 +624,7 @@ objc_mutex_deallocate(objc_mutex_t mutex)
|
|||
ret = pthread_mutex_destroy(p);
|
||||
if (ret == 0)
|
||||
{
|
||||
free(p);
|
||||
objc_free(p);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -2957,7 +2957,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
{
|
||||
if (lib != NULL)
|
||||
{
|
||||
free(lib);
|
||||
objc_free(lib);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -3259,7 +3259,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
*/
|
||||
- (BOOL) _initLibXML
|
||||
{
|
||||
lib = (xmlSAXHandler*)malloc(sizeof(xmlSAXHandler));
|
||||
lib = (xmlSAXHandler*)objc_malloc(sizeof(xmlSAXHandler));
|
||||
if (lib == NULL)
|
||||
{
|
||||
return NO;
|
||||
|
@ -3380,7 +3380,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
|
||||
- (BOOL) _initLibXML
|
||||
{
|
||||
lib = (xmlSAXHandler*)malloc(sizeof(xmlSAXHandler));
|
||||
lib = (xmlSAXHandler*)objc_malloc(sizeof(xmlSAXHandler));
|
||||
if (lib == NULL)
|
||||
{
|
||||
return NO;
|
||||
|
@ -3446,7 +3446,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
- (BOOL) _initLibXML
|
||||
{
|
||||
isHtmlHandler = YES;
|
||||
lib = (xmlSAXHandler*)malloc(sizeof(htmlSAXHandler));
|
||||
lib = (xmlSAXHandler*)objc_malloc(sizeof(htmlSAXHandler));
|
||||
if (lib == NULL)
|
||||
{
|
||||
return NO;
|
||||
|
|
|
@ -284,7 +284,7 @@ static void GSSetupEncodingTable(void)
|
|||
encTableSize = tmp;
|
||||
}
|
||||
}
|
||||
encTable = malloc((encTableSize+1)*sizeof(struct _strenc_ *));
|
||||
encTable = objc_malloc((encTableSize+1)*sizeof(struct _strenc_ *));
|
||||
memset(encTable, 0, (encTableSize+1)*sizeof(struct _strenc_ *));
|
||||
|
||||
/*
|
||||
|
@ -306,13 +306,13 @@ static void GSSetupEncodingTable(void)
|
|||
/*
|
||||
* See if we can do a lossy conversion.
|
||||
*/
|
||||
lossy = malloc(strlen(encTable[tmp]->iconv) + 12);
|
||||
lossy = objc_malloc(strlen(encTable[tmp]->iconv) + 12);
|
||||
strcpy(lossy, encTable[tmp]->iconv);
|
||||
strcat(lossy, "//TRANSLIT");
|
||||
c = iconv_open(UNICODE_ENC, encTable[tmp]->iconv);
|
||||
if (c == (iconv_t)-1)
|
||||
{
|
||||
free(lossy);
|
||||
objc_free(lossy);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue