python - be: Use snprintf instead of asprintf.

From: jwp(at)pgfoundry(dot)org (James William Pye)
To: pgsql-committers(at)postgresql(dot)org
Subject: python - be: Use snprintf instead of asprintf.
Date: 2006-02-15 04:47:13
Message-ID: 20060215044713.B46DE103384E@pgfoundry.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Use snprintf instead of asprintf.

snprintf is likely to be more portable than asprintf, and the string is actually
simple enough that calculating the resulting size is trivial. Also, it can then
print right to the palloc'd memory instead of pstrdup'ing, saving a malloc/free.

Modified Files:
--------------
be/src:
pl.c (r1.33 -> r1.34)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/pl.c.diff?r1=1.33&r2=1.34)

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2006-02-15 06:30:07 python - be: Add and use interface to deleting function cache entries.
Previous Message Christopher Kings-Lynne 2006-02-15 01:51:46 Re: pgsql: Add psql option: -1 or --single-transaction