mirror of
https://github.com/postgres/postgres.git
synced 2025-12-16 16:42:29 +03:00
Add resetStringInfo(), which clears the content of a StringInfo, and
fixup various places in the tree that were clearing a StringInfo by hand. Making this function a part of the API simplifies client code slightly, and avoids needlessly peeking inside the StringInfo interface.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/lib/stringinfo.h,v 1.33 2007/01/05 22:19:55 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/lib/stringinfo.h,v 1.34 2007/03/03 19:32:55 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -78,6 +78,13 @@ extern StringInfo makeStringInfo(void);
|
||||
*/
|
||||
extern void initStringInfo(StringInfo str);
|
||||
|
||||
/*------------------------
|
||||
* resetStringInfo
|
||||
* Clears the current content of the StringInfo, if any. The
|
||||
* StringInfo remains valid.
|
||||
*/
|
||||
extern void resetStringInfo(StringInfo str);
|
||||
|
||||
/*------------------------
|
||||
* appendStringInfo
|
||||
* Format text data under the control of fmt (an sprintf-style format string)
|
||||
|
||||
Reference in New Issue
Block a user