[libpng16] Eliminated png_info_destroy. It is now used only in png.c
and only calls one other internal function and memset.
This commit is contained in:
parent
5a956a7a58
commit
df477e4652
10
ANNOUNCE
10
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.6.0beta04 - December 22, 2011
|
||||
Libpng 1.6.0beta04 - December 24, 2011
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -29,7 +29,8 @@ Changes since the last public release (1.5.7):
|
||||
Version 1.6.0beta01 [December 15, 2011]
|
||||
Removed machine-generated configure files from the GIT repository (they will
|
||||
continue to appear in the tarball distributions).
|
||||
Restored the new 'simplified' API, which was deleted from libpng-1.5.7.
|
||||
Restored the new 'simplified' API, which was started in libpng-1.5.7beta02
|
||||
but later deleted from libpng-1.5.7beta05.
|
||||
Added example programs for the new 'simplified' API.
|
||||
Added ANSI-C (C90) headers and require them, and take advantage of the
|
||||
change. Also fixed some of the projects/* and contrib/* files that needed
|
||||
@ -76,7 +77,10 @@ Version 1.6.0beta03 [December 22, 2011]
|
||||
decreases in code size by 1733 bytes. pngerror.o increases in size by
|
||||
about 465 bytes because of the new functionality.
|
||||
|
||||
Version 1.6.0beta04 [December 22, 2011]
|
||||
Version 1.6.0beta04 [December 24, 2011]
|
||||
Regenerated configure scripts with automake-1.11.2
|
||||
Eliminated png_info_destroy. It is now used only in png.c and only calls one
|
||||
other internal functions and memset.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
8
CHANGES
8
CHANGES
@ -3780,7 +3780,8 @@ Version 1.5.7 [December 15, 2011]
|
||||
Version 1.6.0beta01 [December 15, 2011]
|
||||
Removed machine-generated configure files from the GIT repository (they will
|
||||
continue to appear in the tarball distributions).
|
||||
Restored the new 'simplified' API, which was deleted from libpng-1.5.7.
|
||||
Restored the new 'simplified' API, which was started in libpng-1.5.7beta02
|
||||
but later deleted from libpng-1.5.7beta05.
|
||||
Added example programs for the new 'simplified' API.
|
||||
Added ANSI-C (C90) headers and require them, and take advantage of the
|
||||
change. Also fixed some of the projects/* and contrib/* files that needed
|
||||
@ -3827,7 +3828,10 @@ Version 1.6.0beta03 [December 22, 2011]
|
||||
decreases in code size by 1733 bytes. pngerror.o increases in size by
|
||||
about 465 bytes because of the new functionality.
|
||||
|
||||
Version 1.6.0beta04 [December 22, 2011]
|
||||
Version 1.6.0beta04 [December 24, 2011]
|
||||
Regenerated configure scripts with automake-1.11.2
|
||||
Eliminated png_info_destroy. It is now used only in png.c and only calls one
|
||||
other internal functions and memset.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
21
png.c
21
png.c
@ -387,7 +387,8 @@ png_destroy_info_struct(png_const_structp png_ptr, png_infopp info_ptr_ptr)
|
||||
*/
|
||||
*info_ptr_ptr = NULL;
|
||||
|
||||
png_info_destroy(png_ptr, info_ptr);
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
|
||||
png_memset(info_ptr, 0, sizeof *info_ptr);
|
||||
png_free(png_ptr, info_ptr);
|
||||
}
|
||||
}
|
||||
@ -641,20 +642,6 @@ png_free_data(png_const_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
|
||||
|
||||
info_ptr->free_me &= ~mask;
|
||||
}
|
||||
|
||||
/* This is an internal routine to free any memory that the info struct is
|
||||
* pointing to before re-using it or freeing the struct itself. Recall
|
||||
* that png_free() checks for NULL pointers for us.
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
png_info_destroy(png_const_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_info_destroy");
|
||||
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
|
||||
|
||||
png_memset(info_ptr, 0, sizeof *info_ptr);
|
||||
}
|
||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||
|
||||
/* This function returns a pointer to the io_ptr associated with the user
|
||||
@ -775,13 +762,13 @@ png_get_copyright(png_const_structp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.0beta04 - December 22, 2011" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.0beta04 - December 24, 2011" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.6.0beta04 - December 22, 2011\
|
||||
return "libpng version 1.6.0beta04 - December 24, 2011\
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
|
@ -710,10 +710,6 @@ PNG_EXTERN PNG_FUNCTION(png_structp,png_create_png_struct,
|
||||
/* Free memory from internal libpng struct */
|
||||
PNG_EXTERN void png_destroy_png_struct PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Free any memory that info_ptr points to and reset struct. */
|
||||
PNG_EXTERN void png_info_destroy PNGARG((png_const_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
/* Free an allocated jmp_buf (always succeeds) */
|
||||
PNG_EXTERN void png_free_jmpbuf PNGARG((png_structp png_ptr));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user