summaryrefslogtreecommitdiff
path: root/src/pl/plpython
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2013-05-29 16:58:43 -0400
committerBruce Momjian <bruce@momjian.us>2013-05-29 16:58:43 -0400
commit9af4159fce6654aa0e081b00d02bca40b978745c (patch)
tree3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/pl/plpython
parent07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff)
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
Diffstat (limited to 'src/pl/plpython')
-rw-r--r--src/pl/plpython/plpy_elog.c4
-rw-r--r--src/pl/plpython/plpy_util.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c
index 70450d7d9e5..44d35a747b2 100644
--- a/src/pl/plpython/plpy_elog.c
+++ b/src/pl/plpython/plpy_elog.c
@@ -342,8 +342,8 @@ PLy_traceback(char **xmsg, char **tbmsg, int *tb_depth)
static void
PLy_get_spi_sqlerrcode(PyObject *exc, int *sqlerrcode)
{
- PyObject *sqlstate;
- char *buffer;
+ PyObject *sqlstate;
+ char *buffer;
sqlstate = PyObject_GetAttrString(exc, "sqlstate");
if (sqlstate == NULL)
diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c
index 9a921d92906..95cbba5cdc5 100644
--- a/src/pl/plpython/plpy_util.c
+++ b/src/pl/plpython/plpy_util.c
@@ -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();
{