From d35aea7090c3a824a3a65a4a912d805b9c9252f5 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Thu, 2 Mar 2000 01:07:50 +0000 Subject: [PATCH] ft_new_input_stream(): set the pathname field of the stream to args->pathname. Needed for the Mac fond driver. ft_done_stream(): free the pathname field, if not null --- src/base/ftobjs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index cc46ac2d8..479981bb8 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -242,7 +242,14 @@ /* do we have an 8-bit pathname? */ else if ( args->pathname ) + { error = FT_New_Stream( args->pathname, stream ); + if ( !error ) + { + if ( !ALLOC( stream->pathname.pointer, strlen(args->pathname)+1 ) ) + strcpy( stream->pathname.pointer, args->pathname ); + } + } /* do we have a custom stream? */ else if ( args->stream ) @@ -280,7 +287,10 @@ if ( stream->close ) stream->close( stream ); - + + if ( stream->pathname.pointer ) + FREE( stream->pathname.pointer ); + FREE( stream ); *astream = 0; }