diff options
| author | Tom Lane | 2017-06-21 19:18:54 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-06-21 19:19:25 +0000 |
| commit | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch) | |
| tree | e85979fb1213a731b7b557f8a830df541f26b135 /src/pl | |
| parent | f669c09989bda894d6ba01634ccb229f0687c08a (diff) | |
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments
to the right of code, and remove pgindent hack that caused comments
following #endif to not obey the general rule.
Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using
the published version of pg_bsd_indent, but a hacked-up version that
tried to minimize the amount of movement of comments to the right of
code. The situation of interest is where such a comment has to be
moved to the right of its default placement at column 33 because there's
code there. BSD indent has always moved right in units of tab stops
in such cases --- but in the previous incarnation, indent was working
in 8-space tab stops, while now it knows we use 4-space tabs. So the
net result is that in about half the cases, such comments are placed
one tab stop left of before. This is better all around: it leaves
more room on the line for comment text, and it means that in such
cases the comment uniformly starts at the next 4-space tab stop after
the code, rather than sometimes one and sometimes two tabs after.
Also, ensure that comments following #endif are indented the same
as comments following other preprocessor commands such as #else.
That inconsistency turns out to have been self-inflicted damage
from a poorly-thought-through post-indent "fixup" in pgindent.
This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.
Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plperl/plperl.c | 10 | ||||
| -rw-r--r-- | src/pl/plperl/plperl.h | 6 | ||||
| -rw-r--r-- | src/pl/plperl/plperl_helpers.h | 4 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_comp.c | 8 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 16 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/plpgsql.h | 16 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_cursorobject.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_elog.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_exec.c | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_exec.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_main.c | 6 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_main.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_planobject.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_plpymodule.c | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_plpymodule.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_procedure.h | 4 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_resultobject.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_spi.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_subxactobject.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_typeio.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_util.c | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpy_util.h | 2 | ||||
| -rw-r--r-- | src/pl/plpython/plpython.h | 6 | ||||
| -rw-r--r-- | src/pl/tcl/pltcl.c | 12 |
24 files changed, 58 insertions, 58 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 5b0d5aa8e83..02ce6703469 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -739,7 +739,7 @@ plperl_init_interp(void) STMT_START { \ if (saved != NULL) { setlocale_perl(name, saved); pfree(saved); } \ } STMT_END -#endif /* WIN32 */ +#endif /* WIN32 */ if (plperl_on_init && *plperl_on_init) { @@ -2956,7 +2956,7 @@ plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc) check_stack_depth(); hv = newHV(); - hv_ksplit(hv, tupdesc->natts); /* pre-grow the hash */ + hv_ksplit(hv, tupdesc->natts); /* pre-grow the hash */ for (i = 0; i < tupdesc->natts; i++) { @@ -3933,7 +3933,7 @@ setlocale_perl(int category, char *locale) newctype = RETVAL; new_ctype(newctype); } -#endif /* USE_LOCALE_CTYPE */ +#endif /* USE_LOCALE_CTYPE */ #ifdef USE_LOCALE_COLLATE if (category == LC_COLLATE #ifdef LC_ALL @@ -3951,7 +3951,7 @@ setlocale_perl(int category, char *locale) newcoll = RETVAL; new_collate(newcoll); } -#endif /* USE_LOCALE_COLLATE */ +#endif /* USE_LOCALE_COLLATE */ #ifdef USE_LOCALE_NUMERIC if (category == LC_NUMERIC @@ -3970,7 +3970,7 @@ setlocale_perl(int category, char *locale) newnum = RETVAL; new_numeric(newnum); } -#endif /* USE_LOCALE_NUMERIC */ +#endif /* USE_LOCALE_NUMERIC */ } return RETVAL; diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index ae367b0fc15..eecd1928024 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -62,8 +62,8 @@ #else #define vsnprintf pg_vsnprintf #define snprintf pg_snprintf -#endif /* __GNUC__ */ -#endif /* USE_REPL_SNPRINTF */ +#endif /* __GNUC__ */ +#endif /* USE_REPL_SNPRINTF */ /* perl version and platform portability */ #define NEED_eval_pv @@ -107,4 +107,4 @@ void plperl_spi_freeplan(char *); void plperl_spi_cursor_close(char *); char *plperl_sv_to_literal(SV *, char *); -#endif /* PL_PERL_H */ +#endif /* PL_PERL_H */ diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index f8aa06835ce..76124edc078 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -158,7 +158,7 @@ croak_cstr(const char *str) sv_setsv(errsv, ssv); croak(NULL); -#endif /* croak_sv */ +#endif /* croak_sv */ } -#endif /* PL_PERL_HELPERS_H */ +#endif /* PL_PERL_HELPERS_H */ diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index aeb8e4dfe72..41cac84867b 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -352,7 +352,7 @@ do_compile(FunctionCallInfo fcinfo, function->fn_tid = procTup->t_self; function->fn_input_collation = fcinfo->fncollation; function->fn_cxt = func_cxt; - function->out_param_varno = -1; /* set up for no OUT param */ + function->out_param_varno = -1; /* set up for no OUT param */ function->resolve_option = plpgsql_variable_conflict; function->print_strict_params = plpgsql_print_strict_params; /* only promote extra warnings and errors at CREATE FUNCTION time */ @@ -838,7 +838,7 @@ plpgsql_compile_inline(char *proc_source) function->fn_is_trigger = PLPGSQL_NOT_TRIGGER; function->fn_input_collation = InvalidOid; function->fn_cxt = func_cxt; - function->out_param_varno = -1; /* set up for no OUT param */ + function->out_param_varno = -1; /* set up for no OUT param */ function->resolve_option = plpgsql_variable_conflict; function->print_strict_params = plpgsql_print_strict_params; @@ -1439,7 +1439,7 @@ plpgsql_parse_dblword(char *word1, char *word2, /* Block-qualified reference to scalar variable. */ wdatum->datum = plpgsql_Datums[ns->itemno]; wdatum->ident = NULL; - wdatum->quoted = false; /* not used */ + wdatum->quoted = false; /* not used */ wdatum->idents = idents; return true; @@ -1469,7 +1469,7 @@ plpgsql_parse_dblword(char *word1, char *word2, wdatum->datum = plpgsql_Datums[ns->itemno]; } wdatum->ident = NULL; - wdatum->quoted = false; /* not used */ + wdatum->quoted = false; /* not used */ wdatum->idents = idents; return true; diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index da86702bdd6..20ad7eea0de 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -81,8 +81,8 @@ typedef struct typedef struct SimpleEcontextStackEntry { ExprContext *stack_econtext; /* a stacked econtext */ - SubTransactionId xact_subxid; /* ID for current subxact */ - struct SimpleEcontextStackEntry *next; /* next stack entry up */ + SubTransactionId xact_subxid; /* ID for current subxact */ + struct SimpleEcontextStackEntry *next; /* next stack entry up */ } SimpleEcontextStackEntry; static EState *shared_simple_eval_estate = NULL; @@ -543,7 +543,7 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo, * the generated result type, instead. */ tupdesc = estate.rettupdesc; - if (tupdesc == NULL) /* shouldn't happen */ + if (tupdesc == NULL) /* shouldn't happen */ elog(ERROR, "return type must be a row type"); break; default: @@ -2726,7 +2726,7 @@ exec_stmt_return(PLpgSQL_execstate *estate, PLpgSQL_stmt_return *stmt) if (!row->rowtupdesc) /* should not happen */ elog(ERROR, "row variable has no tupdesc"); tup = make_tuple_from_row(estate, row, row->rowtupdesc); - if (tup == NULL) /* should not happen */ + if (tup == NULL) /* should not happen */ elog(ERROR, "row not compatible with its own tupdesc"); estate->retval = PointerGetDatum(tup); estate->rettupdesc = row->rowtupdesc; @@ -3441,7 +3441,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate, estate->paramLI->paramFetch = plpgsql_param_fetch; estate->paramLI->paramFetchArg = (void *) estate; estate->paramLI->parserSetup = (ParserSetupHook) plpgsql_parser_setup; - estate->paramLI->parserSetupArg = NULL; /* filled during use */ + estate->paramLI->parserSetupArg = NULL; /* filled during use */ estate->paramLI->numParams = estate->ndatums; estate->paramLI->paramMask = NULL; estate->params_dirty = false; @@ -3456,7 +3456,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate, ctl.entrysize = sizeof(plpgsql_CastHashEntry); ctl.hcxt = CurrentMemoryContext; estate->cast_hash = hash_create("PLpgSQL private cast cache", - 16, /* start small and extend */ + 16, /* start small and extend */ &ctl, HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); estate->cast_hash_context = CurrentMemoryContext; @@ -4765,7 +4765,7 @@ exec_assign_value(PLpgSQL_execstate *estate, * array, either, so that's a no-op too. This is all ugly but * corresponds to the current behavior of execExpr*.c. */ - if (arrayelem->arraytyplen > 0 && /* fixed-length array? */ + if (arrayelem->arraytyplen > 0 && /* fixed-length array? */ (oldarrayisnull || isNull)) return; @@ -5102,7 +5102,7 @@ plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate, default: elog(ERROR, "unrecognized dtype: %d", datum->dtype); - *typeid = InvalidOid; /* keep compiler quiet */ + *typeid = InvalidOid; /* keep compiler quiet */ *typmod = -1; *collation = InvalidOid; break; diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h index 0f790ee536d..2b199485624 100644 --- a/src/pl/plpgsql/src/plpgsql.h +++ b/src/pl/plpgsql/src/plpgsql.h @@ -232,10 +232,10 @@ typedef struct PLpgSQL_expr struct PLpgSQL_nsitem *ns; /* fields for "simple expression" fast-path execution: */ - Expr *expr_simple_expr; /* NULL means not a simple expr */ + Expr *expr_simple_expr; /* NULL means not a simple expr */ int expr_simple_generation; /* plancache generation we checked */ - Oid expr_simple_type; /* result type Oid, if simple */ - int32 expr_simple_typmod; /* result typmod, if simple */ + Oid expr_simple_type; /* result type Oid, if simple */ + int32 expr_simple_typmod; /* result typmod, if simple */ /* * if expr is simple AND prepared in current transaction, @@ -243,8 +243,8 @@ typedef struct PLpgSQL_expr * seeing if expr_simple_lxid matches current LXID. (If not, * expr_simple_state probably points at garbage!) */ - ExprState *expr_simple_state; /* eval tree for expr_simple_expr */ - bool expr_simple_in_use; /* true if eval tree is active */ + ExprState *expr_simple_state; /* eval tree for expr_simple_expr */ + bool expr_simple_in_use; /* true if eval tree is active */ LocalTransactionId expr_simple_lxid; } PLpgSQL_expr; @@ -865,7 +865,7 @@ typedef struct PLpgSQL_function /* the datums representing the function's local variables */ int ndatums; PLpgSQL_datum **datums; - Bitmapset *resettable_datums; /* dnos of non-simple vars */ + Bitmapset *resettable_datums; /* dnos of non-simple vars */ /* function body parsetree */ PLpgSQL_stmt_block *action; @@ -897,7 +897,7 @@ typedef struct PLpgSQL_execstate * CONTINUE stmt, if any */ ErrorData *cur_error; /* current exception handler's error */ - Tuplestorestate *tuple_store; /* SRFs accumulate results here */ + Tuplestorestate *tuple_store; /* SRFs accumulate results here */ MemoryContext tuple_store_cxt; ResourceOwner tuple_store_owner; ReturnSetInfo *rsi; @@ -1153,4 +1153,4 @@ extern void plpgsql_scanner_finish(void); */ extern int plpgsql_yyparse(void); -#endif /* PLPGSQL_H */ +#endif /* PLPGSQL_H */ diff --git a/src/pl/plpython/plpy_cursorobject.h b/src/pl/plpython/plpy_cursorobject.h index ef23865dd2c..018b169cbf2 100644 --- a/src/pl/plpython/plpy_cursorobject.h +++ b/src/pl/plpython/plpy_cursorobject.h @@ -21,4 +21,4 @@ extern void PLy_cursor_init_type(void); extern PyObject *PLy_cursor(PyObject *self, PyObject *args); extern PyObject *PLy_cursor_plan(PyObject *ob, PyObject *args); -#endif /* PLPY_CURSOROBJECT_H */ +#endif /* PLPY_CURSOROBJECT_H */ diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h index 5dd4ef7a146..6bc50fd227d 100644 --- a/src/pl/plpython/plpy_elog.h +++ b/src/pl/plpython/plpy_elog.h @@ -19,4 +19,4 @@ extern void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, co extern void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata); -#endif /* PLPY_ELOG_H */ +#endif /* PLPY_ELOG_H */ diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c index a1ecc6d2a46..e59d076695b 100644 --- a/src/pl/plpython/plpy_exec.c +++ b/src/pl/plpython/plpy_exec.c @@ -31,7 +31,7 @@ typedef struct PLySRFState { PyObject *iter; /* Python iterator producing results */ PLySavedArgs *savedargs; /* function argument values */ - MemoryContextCallback callback; /* for releasing refcounts when done */ + MemoryContextCallback callback; /* for releasing refcounts when done */ } PLySRFState; static PyObject *PLy_function_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc); diff --git a/src/pl/plpython/plpy_exec.h b/src/pl/plpython/plpy_exec.h index 439a1d801f6..68da1ffcb2e 100644 --- a/src/pl/plpython/plpy_exec.h +++ b/src/pl/plpython/plpy_exec.h @@ -10,4 +10,4 @@ extern Datum PLy_exec_function(FunctionCallInfo fcinfo, PLyProcedure *proc); extern HeapTuple PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc); -#endif /* PLPY_EXEC_H */ +#endif /* PLPY_EXEC_H */ diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c index 860b804e545..7df50c09c82 100644 --- a/src/pl/plpython/plpy_main.c +++ b/src/pl/plpython/plpy_main.c @@ -214,7 +214,7 @@ plpython2_validator(PG_FUNCTION_ARGS) /* call plpython validator with our fcinfo so it gets our oid */ return plpython_validator(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ Datum plpython_call_handler(PG_FUNCTION_ARGS) @@ -288,7 +288,7 @@ plpython2_call_handler(PG_FUNCTION_ARGS) { return plpython_call_handler(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ Datum plpython_inline_handler(PG_FUNCTION_ARGS) @@ -368,7 +368,7 @@ plpython2_inline_handler(PG_FUNCTION_ARGS) { return plpython_inline_handler(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ static bool PLy_procedure_is_trigger(Form_pg_proc procStruct) diff --git a/src/pl/plpython/plpy_main.h b/src/pl/plpython/plpy_main.h index 10426c43236..e8c97c24d7f 100644 --- a/src/pl/plpython/plpy_main.h +++ b/src/pl/plpython/plpy_main.h @@ -28,4 +28,4 @@ extern PLyExecutionContext *PLy_current_execution_context(void); /* Get the scratch memory context for specified execution context */ extern MemoryContext PLy_get_scratch_context(PLyExecutionContext *context); -#endif /* PLPY_MAIN_H */ +#endif /* PLPY_MAIN_H */ diff --git a/src/pl/plpython/plpy_planobject.h b/src/pl/plpython/plpy_planobject.h index c67559266ec..5adc957053f 100644 --- a/src/pl/plpython/plpy_planobject.h +++ b/src/pl/plpython/plpy_planobject.h @@ -24,4 +24,4 @@ extern void PLy_plan_init_type(void); extern PyObject *PLy_plan_new(void); extern bool is_PLyPlanObject(PyObject *ob); -#endif /* PLPY_PLANOBJECT_H */ +#endif /* PLPY_PLANOBJECT_H */ diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c index ad160aeec36..619c471903e 100644 --- a/src/pl/plpython/plpy_plpymodule.c +++ b/src/pl/plpython/plpy_plpymodule.c @@ -140,7 +140,7 @@ PyInit_plpy(void) return m; } -#endif /* PY_MAJOR_VERSION >= 3 */ +#endif /* PY_MAJOR_VERSION >= 3 */ void PLy_init_plpy(void) diff --git a/src/pl/plpython/plpy_plpymodule.h b/src/pl/plpython/plpy_plpymodule.h index ee089b78a16..54d78101ceb 100644 --- a/src/pl/plpython/plpy_plpymodule.h +++ b/src/pl/plpython/plpy_plpymodule.h @@ -16,4 +16,4 @@ PyMODINIT_FUNC PyInit_plpy(void); #endif extern void PLy_init_plpy(void); -#endif /* PLPY_PLPYMODULE_H */ +#endif /* PLPY_PLPYMODULE_H */ diff --git a/src/pl/plpython/plpy_procedure.h b/src/pl/plpython/plpy_procedure.h index 8ffa38e0686..d05944fc398 100644 --- a/src/pl/plpython/plpy_procedure.h +++ b/src/pl/plpython/plpy_procedure.h @@ -17,7 +17,7 @@ typedef struct PLySavedArgs struct PLySavedArgs *next; /* linked-list pointer */ PyObject *args; /* "args" element of globals dict */ int nargs; /* length of namedargs array */ - PyObject *namedargs[FLEXIBLE_ARRAY_MEMBER]; /* named args */ + PyObject *namedargs[FLEXIBLE_ARRAY_MEMBER]; /* named args */ } PLySavedArgs; /* cached procedure data */ @@ -66,4 +66,4 @@ extern PLyProcedure *PLy_procedure_get(Oid fn_oid, Oid fn_rel, bool is_trigger); extern void PLy_procedure_compile(PLyProcedure *proc, const char *src); extern void PLy_procedure_delete(PLyProcedure *proc); -#endif /* PLPY_PROCEDURE_H */ +#endif /* PLPY_PROCEDURE_H */ diff --git a/src/pl/plpython/plpy_resultobject.h b/src/pl/plpython/plpy_resultobject.h index 314510c40ff..bbaca0dd00f 100644 --- a/src/pl/plpython/plpy_resultobject.h +++ b/src/pl/plpython/plpy_resultobject.h @@ -22,4 +22,4 @@ typedef struct PLyResultObject extern void PLy_result_init_type(void); extern PyObject *PLy_result_new(void); -#endif /* PLPY_RESULTOBJECT_H */ +#endif /* PLPY_RESULTOBJECT_H */ diff --git a/src/pl/plpython/plpy_spi.h b/src/pl/plpython/plpy_spi.h index 817a7584e79..d6b0a4707bc 100644 --- a/src/pl/plpython/plpy_spi.h +++ b/src/pl/plpython/plpy_spi.h @@ -23,4 +23,4 @@ extern void PLy_spi_subtransaction_begin(MemoryContext oldcontext, ResourceOwner extern void PLy_spi_subtransaction_commit(MemoryContext oldcontext, ResourceOwner oldowner); extern void PLy_spi_subtransaction_abort(MemoryContext oldcontext, ResourceOwner oldowner); -#endif /* PLPY_SPI_H */ +#endif /* PLPY_SPI_H */ diff --git a/src/pl/plpython/plpy_subxactobject.h b/src/pl/plpython/plpy_subxactobject.h index d9c3929234d..92a9e635f3a 100644 --- a/src/pl/plpython/plpy_subxactobject.h +++ b/src/pl/plpython/plpy_subxactobject.h @@ -29,4 +29,4 @@ typedef struct PLySubtransactionData extern void PLy_subtransaction_init_type(void); extern PyObject *PLy_subtransaction_new(PyObject *self, PyObject *unused); -#endif /* PLPY_SUBXACTOBJECT */ +#endif /* PLPY_SUBXACTOBJECT */ diff --git a/src/pl/plpython/plpy_typeio.h b/src/pl/plpython/plpy_typeio.h index e04722c47a5..95f84d83418 100644 --- a/src/pl/plpython/plpy_typeio.h +++ b/src/pl/plpython/plpy_typeio.h @@ -119,4 +119,4 @@ extern PyObject *PLyDict_FromTuple(PLyTypeInfo *info, HeapTuple tuple, TupleDesc /* conversion from Python objects to C strings */ extern char *PLyObject_AsString(PyObject *plrv); -#endif /* PLPY_TYPEIO_H */ +#endif /* PLPY_TYPEIO_H */ diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c index f2d59491376..35d57a9e80d 100644 --- a/src/pl/plpython/plpy_util.c +++ b/src/pl/plpython/plpy_util.c @@ -132,4 +132,4 @@ PLyUnicode_FromString(const char *s) return PLyUnicode_FromStringAndSize(s, strlen(s)); } -#endif /* PY_MAJOR_VERSION >= 3 */ +#endif /* PY_MAJOR_VERSION >= 3 */ diff --git a/src/pl/plpython/plpy_util.h b/src/pl/plpython/plpy_util.h index 66c5ccf8ac3..f990bb08908 100644 --- a/src/pl/plpython/plpy_util.h +++ b/src/pl/plpython/plpy_util.h @@ -14,4 +14,4 @@ extern PyObject *PLyUnicode_FromString(const char *s); extern PyObject *PLyUnicode_FromStringAndSize(const char *s, Py_ssize_t size); #endif -#endif /* PLPY_UTIL_H */ +#endif /* PLPY_UTIL_H */ diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h index d687860ab28..9a8e8f246da 100644 --- a/src/pl/plpython/plpython.h +++ b/src/pl/plpython/plpython.h @@ -138,8 +138,8 @@ typedef int Py_ssize_t; #else #define vsnprintf pg_vsnprintf #define snprintf pg_snprintf -#endif /* __GNUC__ */ -#endif /* USE_REPL_SNPRINTF */ +#endif /* __GNUC__ */ +#endif /* USE_REPL_SNPRINTF */ /* * Used throughout, and also by the Python 2/3 porting layer, so it's easier to @@ -147,4 +147,4 @@ typedef int Py_ssize_t; */ #include "plpy_util.h" -#endif /* PLPYTHON_H */ +#endif /* PLPYTHON_H */ diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 89bb46fb4a9..ca4b4b551e7 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -135,16 +135,16 @@ typedef struct pltcl_interp_desc typedef struct pltcl_proc_desc { char *user_proname; /* user's name (from pg_proc.proname) */ - char *internal_proname; /* Tcl name (based on function OID) */ + char *internal_proname; /* Tcl name (based on function OID) */ MemoryContext fn_cxt; /* memory context for this procedure */ unsigned long fn_refcount; /* number of active references */ TransactionId fn_xmin; /* xmin of pg_proc row */ ItemPointerData fn_tid; /* TID of pg_proc row */ bool fn_readonly; /* is function readonly? */ bool lanpltrusted; /* is it pltcl (vs. pltclu)? */ - pltcl_interp_desc *interp_desc; /* interpreter to use */ + pltcl_interp_desc *interp_desc; /* interpreter to use */ FmgrInfo result_in_func; /* input function for fn's result type */ - Oid result_typioparam; /* param to pass to same */ + Oid result_typioparam; /* param to pass to same */ bool fn_retisset; /* true if function returns a set */ bool fn_retistuple; /* true if function returns composite */ int nargs; /* number of arguments */ @@ -221,8 +221,8 @@ typedef struct pltcl_call_state AttInMetadata *attinmeta; /* metadata for building tuples of that type */ ReturnSetInfo *rsi; /* passed-in ReturnSetInfo, if any */ - Tuplestorestate *tuple_store; /* SRFs accumulate result here */ - MemoryContext tuple_store_cxt; /* context and resowner for tuplestore */ + Tuplestorestate *tuple_store; /* SRFs accumulate result here */ + MemoryContext tuple_store_cxt; /* context and resowner for tuplestore */ ResourceOwner tuple_store_owner; } pltcl_call_state; @@ -1054,7 +1054,7 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, /* Find or compile the function */ prodesc = compile_pltcl_function(fcinfo->flinfo->fn_oid, RelationGetRelid(trigdata->tg_relation), - false, /* not an event trigger */ + false, /* not an event trigger */ pltrusted); call_state->prodesc = prodesc; |
