mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:30:48 +00:00
Replace objc_malloc with malloc for structures.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32409 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d2465c5ef3
commit
c028d0568d
3 changed files with 14 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-02-28 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
|
* Source/GSLayoutManager.m
|
||||||
|
* Source/GSKeyBindingTable.m
|
||||||
|
Replace objc_malloc with malloc for structures.
|
||||||
|
|
||||||
2011-02-24 13:15 David Chisnall <theraven@gna.org>
|
2011-02-24 13:15 David Chisnall <theraven@gna.org>
|
||||||
|
|
||||||
* libs/gui/trunk/Source/NSDocumentController.m: Comment out unused
|
* libs/gui/trunk/Source/NSDocumentController.m: Comment out unused
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* GSKeyBindingTable.m -*-objc-*-
|
/* GSKeyBindingTable.m -*-objc-*-
|
||||||
|
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Author: Nicola Pero <n.pero@mi.flashnet.it>
|
Author: Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
Date: February 2002
|
Date: February 2002
|
||||||
|
@ -208,7 +208,7 @@
|
||||||
if (_bindingsCount == 0)
|
if (_bindingsCount == 0)
|
||||||
{
|
{
|
||||||
_bindingsCount = 1;
|
_bindingsCount = 1;
|
||||||
_bindings = objc_malloc (sizeof (struct _GSKeyBinding));
|
_bindings = malloc (sizeof (struct _GSKeyBinding));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
GSLayoutManager.m
|
GSLayoutManager.m
|
||||||
|
|
||||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
Copyright (C) 2002-2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Author: Alexander Malmberg <alexander@malmberg.org>
|
Author: Alexander Malmberg <alexander@malmberg.org>
|
||||||
Date: November 2002 - February 2003
|
Date: November 2002 - February 2003
|
||||||
|
@ -63,7 +63,7 @@ static glyph_run_t *run_insert(glyph_run_head_t **context, int level)
|
||||||
int i, size;
|
int i, size;
|
||||||
|
|
||||||
size = sizeof(glyph_run_head_t) * level + sizeof(glyph_run_t);
|
size = sizeof(glyph_run_head_t) * level + sizeof(glyph_run_t);
|
||||||
h = objc_malloc(size);
|
h = malloc(size);
|
||||||
memset(h, 0, size);
|
memset(h, 0, size);
|
||||||
|
|
||||||
for (i = level; i >= 0; i--, h++)
|
for (i = level; i >= 0; i--, h++)
|
||||||
|
@ -253,7 +253,7 @@ Private method used internally by GSLayoutManager for sanity checking.
|
||||||
glyph_run_head_t *h;
|
glyph_run_head_t *h;
|
||||||
|
|
||||||
size = sizeof(glyph_run_head_t) * (SKIP_LIST_DEPTH - 1) + sizeof(glyph_run_t);
|
size = sizeof(glyph_run_head_t) * (SKIP_LIST_DEPTH - 1) + sizeof(glyph_run_t);
|
||||||
glyphs = objc_malloc(size);
|
glyphs = malloc(size);
|
||||||
memset(glyphs, 0, size);
|
memset(glyphs, 0, size);
|
||||||
|
|
||||||
for (h = glyphs, i = SKIP_LIST_DEPTH; i; i--, h++)
|
for (h = glyphs, i = SKIP_LIST_DEPTH; i; i--, h++)
|
||||||
|
@ -2185,7 +2185,7 @@ by calling this incorrectly.
|
||||||
if (!tc->size_linefrags)
|
if (!tc->size_linefrags)
|
||||||
{
|
{
|
||||||
tc->size_linefrags = 16;
|
tc->size_linefrags = 16;
|
||||||
tc->linefrags = objc_malloc(sizeof(linefrag_t) * tc->size_linefrags);
|
tc->linefrags = malloc(sizeof(linefrag_t) * tc->size_linefrags);
|
||||||
}
|
}
|
||||||
tc->num_linefrags = 1;
|
tc->num_linefrags = 1;
|
||||||
lf = tc->linefrags;
|
lf = tc->linefrags;
|
||||||
|
@ -2304,7 +2304,7 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
||||||
__PRETTY_FUNCTION__];
|
__PRETTY_FUNCTION__];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lp = lf->points = objc_malloc(sizeof(linefrag_point_t));
|
lp = lf->points = malloc(sizeof(linefrag_point_t));
|
||||||
lf->num_points++;
|
lf->num_points++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3155,7 +3155,7 @@ forStartingGlyphAtIndex: (NSUInteger)glyph
|
||||||
len = glyph - gpos + length;
|
len = glyph - gpos + length;
|
||||||
if (!run->glyphs)
|
if (!run->glyphs)
|
||||||
{
|
{
|
||||||
run->glyphs = objc_malloc(sizeof(glyph_t) * len);
|
run->glyphs = malloc(sizeof(glyph_t) * len);
|
||||||
memset(run->glyphs, 0, sizeof(glyph_t) * len);
|
memset(run->glyphs, 0, sizeof(glyph_t) * len);
|
||||||
}
|
}
|
||||||
else if (run->head.glyph_length < len)
|
else if (run->head.glyph_length < len)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue