1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

pgindent run for release 9.3

This is the first run of the Perl-based pgindent script.  Also update
pgindent instructions.
This commit is contained in:
Bruce Momjian
2013-05-29 16:58:43 -04:00
parent 07ab261ef3
commit 9af4159fce
367 changed files with 4222 additions and 3829 deletions

View File

@ -61,8 +61,10 @@ PLy_free(void *ptr)
PyObject *
PLyUnicode_Bytes(PyObject *unicode)
{
PyObject *bytes, *rv;
char *utf8string, *encoded;
PyObject *bytes,
*rv;
char *utf8string,
*encoded;
/* First encode the Python unicode object with UTF-8. */
bytes = PyUnicode_AsUTF8String(unicode);
@ -70,7 +72,8 @@ PLyUnicode_Bytes(PyObject *unicode)
PLy_elog(ERROR, "could not convert Python Unicode object to bytes");
utf8string = PyBytes_AsString(bytes);
if (utf8string == NULL) {
if (utf8string == NULL)
{
Py_DECREF(bytes);
PLy_elog(ERROR, "could not extract bytes from encoded string");
}
@ -88,10 +91,10 @@ PLyUnicode_Bytes(PyObject *unicode)
PG_TRY();
{
encoded = (char *) pg_do_encoding_conversion(
(unsigned char *) utf8string,
strlen(utf8string),
PG_UTF8,
GetDatabaseEncoding());
(unsigned char *) utf8string,
strlen(utf8string),
PG_UTF8,
GetDatabaseEncoding());
}
PG_CATCH();
{