diff options
Diffstat (limited to 'src/pl')
-rw-r--r-- | src/pl/plperl/plperl.c | 7 | ||||
-rw-r--r-- | src/pl/plperl/plperl.h | 2 | ||||
-rw-r--r-- | src/pl/plperl/plperl_helpers.h | 8 | ||||
-rw-r--r-- | src/pl/plpgsql/src/pl_scanner.c | 3 | ||||
-rw-r--r-- | src/pl/plpgsql/src/plpgsql.h | 2 | ||||
-rw-r--r-- | src/pl/plpython/plpy_elog.c | 4 | ||||
-rw-r--r-- | src/pl/plpython/plpy_util.c | 17 |
7 files changed, 23 insertions, 20 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index ef56a4fab4c..de8cb0e0476 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -98,7 +98,7 @@ typedef struct plperl_interp_desc * * The refcount field counts the struct's reference from the hash table shown * below, plus one reference for each function call level that is using the - * struct. We can release the struct, and the associated Perl sub, when the + * struct. We can release the struct, and the associated Perl sub, when the * refcount goes to zero. **********************************************************************/ typedef struct plperl_proc_desc @@ -866,10 +866,11 @@ pp_require_safe(pTHX) RETPUSHYES; DIE(aTHX_ "Unable to load %s into plperl", name); + /* * In most Perl versions, DIE() expands to a return statement, so the next - * line is not necessary. But in versions between but not including 5.11.1 - * and 5.13.3 it does not, so the next line is necessary to avoid a + * line is not necessary. But in versions between but not including + * 5.11.1 and 5.13.3 it does not, so the next line is necessary to avoid a * "control reaches end of non-void function" warning from gcc. Other * compilers such as Solaris Studio will, however, issue a "statement not * reached" warning instead. diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index 2b1dd9b6894..c86b47e9d23 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -102,6 +102,4 @@ void plperl_spi_freeplan(char *); void plperl_spi_cursor_close(char *); char *plperl_sv_to_literal(SV *, char *); - - #endif /* PL_PERL_H */ diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index ed99194ed1e..3e8aa7c4a26 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -42,8 +42,8 @@ static inline char * utf_e2u(const char *str) { char *ret = - (char *) pg_do_encoding_conversion((unsigned char *) str, strlen(str), - GetDatabaseEncoding(), PG_UTF8); + (char *) pg_do_encoding_conversion((unsigned char *) str, strlen(str), + GetDatabaseEncoding(), PG_UTF8); if (ret == str) ret = pstrdup(ret); @@ -89,8 +89,8 @@ sv2cstr(SV *sv) /* * Request the string from Perl, in UTF-8 encoding; but if we're in a - * SQL_ASCII database, just request the byte soup without trying to make it - * UTF8, because that might fail. + * SQL_ASCII database, just request the byte soup without trying to make + * it UTF8, because that might fail. */ if (GetDatabaseEncoding() == PG_SQL_ASCII) val = SvPV(sv, len); diff --git a/src/pl/plpgsql/src/pl_scanner.c b/src/pl/plpgsql/src/pl_scanner.c index ec448cbbc8b..9b6f57e723f 100644 --- a/src/pl/plpgsql/src/pl_scanner.c +++ b/src/pl/plpgsql/src/pl_scanner.c @@ -528,7 +528,8 @@ plpgsql_scanner_errposition(int location) * Beware of using yyerror for other purposes, as the cursor position might * be misleading! */ -void __attribute__((noreturn)) +void +__attribute__((noreturn)) plpgsql_yyerror(const char *message) { char *yytext = core_yy.scanbuf + plpgsql_yylloc; diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h index 89965010eac..5cc44a0e1c6 100644 --- a/src/pl/plpgsql/src/plpgsql.h +++ b/src/pl/plpgsql/src/plpgsql.h @@ -932,7 +932,7 @@ extern Datum plpgsql_exec_function(PLpgSQL_function *func, extern HeapTuple plpgsql_exec_trigger(PLpgSQL_function *func, TriggerData *trigdata); extern void plpgsql_exec_event_trigger(PLpgSQL_function *func, - EventTriggerData *trigdata); + EventTriggerData *trigdata); extern void plpgsql_xact_cb(XactEvent event, void *arg); extern void plpgsql_subxact_cb(SubXactEvent event, SubTransactionId mySubid, SubTransactionId parentSubid, void *arg); 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(); { |