mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:11:55 +00:00
Make the main typesetting method reentrant.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15913 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
63dcec6afa
commit
8c9dff945f
2 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-02-09 14:48 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Source/GSHorizontalTypesetter.m: Make the main method reentrant
|
||||||
|
by having it allocate a temporary instance to handle calls when
|
||||||
|
it is already in use.
|
||||||
|
|
||||||
2003-02-09 Fred Kiefer <FredKiefer@gmx.de>
|
2003-02-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSColorList.m
|
* Source/NSColorList.m
|
||||||
|
|
|
@ -62,6 +62,7 @@ cache fairly aggressively without having to worry about memory consumption.
|
||||||
free(cache);
|
free(cache);
|
||||||
cache = NULL;
|
cache = NULL;
|
||||||
}
|
}
|
||||||
|
DESTROY(lock);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -896,7 +897,23 @@ restart:
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
BOOL newParagraph;
|
BOOL newParagraph;
|
||||||
|
|
||||||
[lock lock];
|
if (![lock tryLock])
|
||||||
|
{
|
||||||
|
/* Since we might be the shared system typesetter, we must be
|
||||||
|
reentrant. Thus, if we are already in use and can't lock our lock,
|
||||||
|
we create a new instance and let it handle the call. */
|
||||||
|
GSHorizontalTypesetter *temp;
|
||||||
|
|
||||||
|
temp = [[isa alloc] init];
|
||||||
|
ret = [temp layoutGlyphsInLayoutManager: layoutManager
|
||||||
|
inTextContainer: textContainer
|
||||||
|
startingAtGlyphIndex: glyphIndex
|
||||||
|
previousLineFragmentRect: previousLineFragRect
|
||||||
|
nextGlyphIndex: nextGlyphIndex
|
||||||
|
numberOfLineFragments: howMany];
|
||||||
|
DESTROY(temp);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
NS_DURING
|
NS_DURING
|
||||||
curLayoutManager = layoutManager;
|
curLayoutManager = layoutManager;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue