diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c
index 48a7727b798c264d9197ee0004da0430161a9c99..b1ef7d73a3e69f8bd0f47474ce5dd594a24eaf7e 100644
--- a/src/pl/plpython/plpy_cursorobject.c
+++ b/src/pl/plpython/plpy_cursorobject.c
@@ -20,12 +20,12 @@
 #include "plpy_spi.h"
 
 
-static PyObject *PLy_cursor_query(const char *);
-static PyObject *PLy_cursor_plan(PyObject *, PyObject *);
-static void PLy_cursor_dealloc(PyObject *);
-static PyObject *PLy_cursor_iternext(PyObject *);
-static PyObject *PLy_cursor_fetch(PyObject *, PyObject *);
-static PyObject *PLy_cursor_close(PyObject *, PyObject *);
+static PyObject *PLy_cursor_query(const char *query);
+static PyObject *PLy_cursor_plan(PyObject *ob, PyObject *args);
+static void PLy_cursor_dealloc(PyObject *arg);
+static PyObject *PLy_cursor_iternext(PyObject *self);
+static PyObject *PLy_cursor_fetch(PyObject *self, PyObject *args);
+static PyObject *PLy_cursor_close(PyObject *self, PyObject *unused);
 
 static char PLy_cursor_doc[] = {
 	"Wrapper around a PostgreSQL cursor"
diff --git a/src/pl/plpython/plpy_cursorobject.h b/src/pl/plpython/plpy_cursorobject.h
index 706134ea2c75aa4385b4b521bdd4d9af058dea0a..1dd9d48fd58c5049ea0a3e5fdf64cb6f1149a693 100644
--- a/src/pl/plpython/plpy_cursorobject.h
+++ b/src/pl/plpython/plpy_cursorobject.h
@@ -17,6 +17,6 @@ typedef struct PLyCursorObject
 } PLyCursorObject;
 
 extern void PLy_cursor_init_type(void);
-extern PyObject *PLy_cursor(PyObject *, PyObject *);
+extern PyObject *PLy_cursor(PyObject *self, PyObject *args);
 
 #endif	/* PLPY_CURSOROBJECT_H */
diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c
index 0ff55ac8bd8b40790945302bd6891e73cbe5c2c2..741980c7c5674c129b04704ccd25be1331b684c8 100644
--- a/src/pl/plpython/plpy_elog.c
+++ b/src/pl/plpython/plpy_elog.c
@@ -20,10 +20,10 @@ PyObject *PLy_exc_fatal = NULL;
 PyObject *PLy_exc_spi_error = NULL;
 
 
-static void PLy_traceback(char **, char **, int *);
-static void PLy_get_spi_error_data(PyObject *, int *, char **,
-								   char **, char **, int *);
-static char * get_source_line(const char *, int);
+static void PLy_traceback(char **xmsg, char **tbmsg, int *tb_depth);
+static void PLy_get_spi_error_data(PyObject *exc, int *sqlerrcode, char **detail,
+								   char **hint, char **query, int *position);
+static char * get_source_line(const char *src, int lineno);
 
 
 /*
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
index eafc6e4e1099384fc7fe673aacd0f46039440f3f..f7223b005683561ee651691a93314967ff98e7c6 100644
--- a/src/pl/plpython/plpy_elog.h
+++ b/src/pl/plpython/plpy_elog.h
@@ -10,13 +10,13 @@ extern PyObject *PLy_exc_error;
 extern PyObject *PLy_exc_fatal;
 extern PyObject *PLy_exc_spi_error;
 
-extern void PLy_elog(int, const char *,...)
+extern void PLy_elog(int elevel, const char *fmt,...)
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
 
-extern void PLy_exception_set(PyObject *, const char *,...)
+extern void PLy_exception_set(PyObject *exc, const char *fmt,...)
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
 
-extern void PLy_exception_set_plural(PyObject *, const char *, const char *,
+extern void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural,
 									 unsigned long n,...)
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 5)))
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 5)));
diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c
index 7724f3f0cd07ba3d79af1267624ccf9a4e6b267f..ecf4996e8cf31e424d9135d0fc4e9eef4557c29f 100644
--- a/src/pl/plpython/plpy_exec.c
+++ b/src/pl/plpython/plpy_exec.c
@@ -25,18 +25,18 @@
 #include "plpy_subxactobject.h"
 
 
-static PyObject *PLy_function_build_args(FunctionCallInfo, PLyProcedure *);
-static void PLy_function_delete_args(PLyProcedure *);
-static void plpython_return_error_callback(void *);
-
-static PyObject *PLy_trigger_build_args(FunctionCallInfo, PLyProcedure *,
-										HeapTuple *);
-static HeapTuple PLy_modify_tuple(PLyProcedure *, PyObject *,
-								  TriggerData *, HeapTuple);
-static void plpython_trigger_error_callback(void *);
-
-static PyObject *PLy_procedure_call(PLyProcedure *, char *, PyObject *);
-static void PLy_abort_open_subtransactions(int);
+static PyObject *PLy_function_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc);
+static void PLy_function_delete_args(PLyProcedure *proc);
+static void plpython_return_error_callback(void *arg);
+
+static PyObject *PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc,
+										HeapTuple *rv);
+static HeapTuple PLy_modify_tuple(PLyProcedure *proc, PyObject *pltd,
+								  TriggerData *tdata, HeapTuple otup);
+static void plpython_trigger_error_callback(void *arg);
+
+static PyObject *PLy_procedure_call(PLyProcedure *proc, char *kargs, PyObject *vargs);
+static void PLy_abort_open_subtransactions(int save_subxact_level);
 
 
 /* function subhandler */
diff --git a/src/pl/plpython/plpy_exec.h b/src/pl/plpython/plpy_exec.h
index 86ceba13c454306c00ab50e74af404a95ca88338..f3dec074c137da0eb3d17f2c7a6bb55e75528a22 100644
--- a/src/pl/plpython/plpy_exec.h
+++ b/src/pl/plpython/plpy_exec.h
@@ -7,7 +7,7 @@
 
 #include "plpy_procedure.h"
 
-extern Datum PLy_exec_function(FunctionCallInfo, PLyProcedure *);
-extern HeapTuple PLy_exec_trigger(FunctionCallInfo, PLyProcedure *);
+extern Datum PLy_exec_function(FunctionCallInfo fcinfo, PLyProcedure *proc);
+extern HeapTuple PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc);
 
 #endif	/* PLPY_EXEC_H */
diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c
index 03c03d1d7d99d120554747d6a2aa34a0f7cc74de..ae9d87e9a6329eed69b322d3de356dce0ac2b3b1 100644
--- a/src/pl/plpython/plpy_main.c
+++ b/src/pl/plpython/plpy_main.c
@@ -61,9 +61,9 @@ PG_FUNCTION_INFO_V1(plpython2_inline_handler);
 #endif
 
 
-static bool PLy_procedure_is_trigger(Form_pg_proc);
-static void plpython_error_callback(void *);
-static void plpython_inline_error_callback(void *);
+static bool PLy_procedure_is_trigger(Form_pg_proc procStruct);
+static void plpython_error_callback(void *arg);
+static void plpython_inline_error_callback(void *arg);
 static void PLy_init_interp(void);
 
 static const int plpython_python_version = PY_MAJOR_VERSION;
diff --git a/src/pl/plpython/plpy_planobject.c b/src/pl/plpython/plpy_planobject.c
index 01b40d1d8171959c38ca1942727576126b076b9d..8305bd68e96cc640a4725d53f8798302314a3439 100644
--- a/src/pl/plpython/plpy_planobject.c
+++ b/src/pl/plpython/plpy_planobject.c
@@ -13,8 +13,8 @@
 #include "plpy_elog.h"
 
 
-static void PLy_plan_dealloc(PyObject *);
-static PyObject *PLy_plan_status(PyObject *, PyObject *);
+static void PLy_plan_dealloc(PyObject *arg);
+static PyObject *PLy_plan_status(PyObject *self, PyObject *args);
 
 static char PLy_plan_doc[] = {
 	"Store a PostgreSQL plan"
diff --git a/src/pl/plpython/plpy_planobject.h b/src/pl/plpython/plpy_planobject.h
index 959813a24c51fbf9ede463bcad44fcc5adc22123..febc5c25ef61caa3c4ad5a22a6485abc18f99caa 100644
--- a/src/pl/plpython/plpy_planobject.h
+++ b/src/pl/plpython/plpy_planobject.h
@@ -21,6 +21,6 @@ typedef struct PLyPlanObject
 
 extern void PLy_plan_init_type(void);
 extern PyObject *PLy_plan_new(void);
-extern bool is_PLyPlanObject(PyObject *);
+extern bool is_PLyPlanObject(PyObject *ob);
 
 #endif	/* PLPY_PLANOBJECT_H */
diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c
index e911107d9ad2fcf34f0fe5aa6106b7abef7c74d9..d2d0a2a2323c0751c4b5841937de0698e9048aea 100644
--- a/src/pl/plpython/plpy_plpymodule.c
+++ b/src/pl/plpython/plpy_plpymodule.c
@@ -24,20 +24,20 @@
 HTAB *PLy_spi_exceptions = NULL;
 
 
-static void PLy_add_exceptions(PyObject *);
-static void PLy_generate_spi_exceptions(PyObject *, PyObject *);
+static void PLy_add_exceptions(PyObject *plpy);
+static void PLy_generate_spi_exceptions(PyObject *mod, PyObject *base);
 
 /* module functions */
-static PyObject *PLy_debug(PyObject *, PyObject *);
-static PyObject *PLy_log(PyObject *, PyObject *);
-static PyObject *PLy_info(PyObject *, PyObject *);
-static PyObject *PLy_notice(PyObject *, PyObject *);
-static PyObject *PLy_warning(PyObject *, PyObject *);
-static PyObject *PLy_error(PyObject *, PyObject *);
-static PyObject *PLy_fatal(PyObject *, PyObject *);
-static PyObject *PLy_quote_literal(PyObject *, PyObject *);
-static PyObject *PLy_quote_nullable(PyObject *, PyObject *);
-static PyObject *PLy_quote_ident(PyObject *, PyObject *);
+static PyObject *PLy_debug(PyObject *self, PyObject *args);
+static PyObject *PLy_log(PyObject *self, PyObject *args);
+static PyObject *PLy_info(PyObject *self, PyObject *args);
+static PyObject *PLy_notice(PyObject *self, PyObject *args);
+static PyObject *PLy_warning(PyObject *self, PyObject *args);
+static PyObject *PLy_error(PyObject *self, PyObject *args);
+static PyObject *PLy_fatal(PyObject *self, PyObject *args);
+static PyObject *PLy_quote_literal(PyObject *self, PyObject *args);
+static PyObject *PLy_quote_nullable(PyObject *self, PyObject *args);
+static PyObject *PLy_quote_ident(PyObject *self, PyObject *args);
 
 
 /* A list of all known exceptions, generated from backend/utils/errcodes.txt */
diff --git a/src/pl/plpython/plpy_procedure.c b/src/pl/plpython/plpy_procedure.c
index b4f2abe262d991e96705e942408a2ec4e173090d..229966ad795bffa67331c10e6f030b0601dcc56a 100644
--- a/src/pl/plpython/plpy_procedure.c
+++ b/src/pl/plpython/plpy_procedure.c
@@ -28,10 +28,10 @@ PLyProcedure *PLy_curr_procedure = NULL;
 static HTAB *PLy_procedure_cache = NULL;
 static HTAB *PLy_trigger_cache = NULL;
 
-static PLyProcedure *PLy_procedure_create(HeapTuple, Oid, bool);
-static bool PLy_procedure_argument_valid(PLyTypeInfo *);
-static bool PLy_procedure_valid(PLyProcedure *, HeapTuple procTup);
-static char *PLy_procedure_munge_source(const char *, const char *);
+static PLyProcedure *PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger);
+static bool PLy_procedure_argument_valid(PLyTypeInfo *arg);
+static bool PLy_procedure_valid(PLyProcedure *proc, HeapTuple procTup);
+static char *PLy_procedure_munge_source(const char *name, const char *src);
 
 
 void
diff --git a/src/pl/plpython/plpy_procedure.h b/src/pl/plpython/plpy_procedure.h
index 632b975cc19a5edb158986f88e537ecfdbcf724f..e986c7ecc56a1734f4111331d8503383eea541be 100644
--- a/src/pl/plpython/plpy_procedure.h
+++ b/src/pl/plpython/plpy_procedure.h
@@ -40,10 +40,10 @@ typedef struct PLyProcedureEntry
 } PLyProcedureEntry;
 
 /* PLyProcedure manipulation */
-extern char *PLy_procedure_name(PLyProcedure *);
-extern PLyProcedure *PLy_procedure_get(Oid, bool);
-extern void PLy_procedure_compile(PLyProcedure *, const char *);
-extern void PLy_procedure_delete(PLyProcedure *);
+extern char *PLy_procedure_name(PLyProcedure *proc);
+extern PLyProcedure *PLy_procedure_get(Oid fn_oid, bool is_trigger);
+extern void PLy_procedure_compile(PLyProcedure *proc, const char *src);
+extern void PLy_procedure_delete(PLyProcedure *proc);
 
 
 /* currently active plpython function */
diff --git a/src/pl/plpython/plpy_resultobject.c b/src/pl/plpython/plpy_resultobject.c
index e1b89260ff8387ee1f7ec85a106c936c33e58453..bf46a165959a61b113420d4142d9f7cddcf099b5 100644
--- a/src/pl/plpython/plpy_resultobject.c
+++ b/src/pl/plpython/plpy_resultobject.c
@@ -11,14 +11,14 @@
 #include "plpy_resultobject.h"
 
 
-static void PLy_result_dealloc(PyObject *);
-static PyObject *PLy_result_nrows(PyObject *, PyObject *);
-static PyObject *PLy_result_status(PyObject *, PyObject *);
-static Py_ssize_t PLy_result_length(PyObject *);
-static PyObject *PLy_result_item(PyObject *, Py_ssize_t);
-static PyObject *PLy_result_slice(PyObject *, Py_ssize_t, Py_ssize_t);
-static int	PLy_result_ass_item(PyObject *, Py_ssize_t, PyObject *);
-static int	PLy_result_ass_slice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
+static void PLy_result_dealloc(PyObject *arg);
+static PyObject *PLy_result_nrows(PyObject *self, PyObject *args);
+static PyObject *PLy_result_status(PyObject *self, PyObject *args);
+static Py_ssize_t PLy_result_length(PyObject *arg);
+static PyObject *PLy_result_item(PyObject *arg, Py_ssize_t idx);
+static PyObject *PLy_result_slice(PyObject *arg, Py_ssize_t lidx, Py_ssize_t hidx);
+static int	PLy_result_ass_item(PyObject *arg, Py_ssize_t idx, PyObject *item);
+static int	PLy_result_ass_slice(PyObject *rg, Py_ssize_t lidx, Py_ssize_t hidx, PyObject *slice);
 
 static char PLy_result_doc[] = {
 	"Results of a PostgreSQL query"
diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c
index 5e3099ee5bc7c2e6445a32badc7c66a282c7a8e6..3afb1093d57966ce9e461be4698ec393b0770def 100644
--- a/src/pl/plpython/plpy_spi.c
+++ b/src/pl/plpython/plpy_spi.c
@@ -24,10 +24,10 @@
 #include "plpy_resultobject.h"
 
 
-static PyObject *PLy_spi_execute_query(char *, long );
-static PyObject *PLy_spi_execute_plan(PyObject *, PyObject *, long);
-static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *, int, int);
-static void PLy_spi_exception_set(PyObject *, ErrorData *);
+static PyObject *PLy_spi_execute_query(char *query, long limit);
+static PyObject *PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit);
+static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *tuptable, int rows, int status);
+static void PLy_spi_exception_set(PyObject *excclass, ErrorData *edata);
 
 
 /* prepare(query="select * from foo")
diff --git a/src/pl/plpython/plpy_spi.h b/src/pl/plpython/plpy_spi.h
index c59482a3f0fcc40a779ea2ca5bc71b62e207e1a8..f8d31638ec8209ab84c147ff867b90e097d36d98 100644
--- a/src/pl/plpython/plpy_spi.h
+++ b/src/pl/plpython/plpy_spi.h
@@ -8,8 +8,8 @@
 #include "utils/palloc.h"
 #include "utils/resowner.h"
 
-extern PyObject *PLy_spi_prepare(PyObject *, PyObject *);
-extern PyObject *PLy_spi_execute(PyObject *, PyObject *);
+extern PyObject *PLy_spi_prepare(PyObject *self, PyObject *args);
+extern PyObject *PLy_spi_execute(PyObject *self, PyObject *args);
 
 typedef struct PLyExceptionEntry
 {
diff --git a/src/pl/plpython/plpy_subxactobject.c b/src/pl/plpython/plpy_subxactobject.c
index 6c3cc69adfa2f5691002e853ab61c25bc2e5aa2e..9feeddb7231fc3338440c1c6043cea11e1523138 100644
--- a/src/pl/plpython/plpy_subxactobject.c
+++ b/src/pl/plpython/plpy_subxactobject.c
@@ -19,9 +19,9 @@
 List *explicit_subtransactions = NIL;
 
 
-static void PLy_subtransaction_dealloc(PyObject *);
-static PyObject *PLy_subtransaction_enter(PyObject *, PyObject *);
-static PyObject *PLy_subtransaction_exit(PyObject *, PyObject *);
+static void PLy_subtransaction_dealloc(PyObject *subxact);
+static PyObject *PLy_subtransaction_enter(PyObject *self, PyObject *unused);
+static PyObject *PLy_subtransaction_exit(PyObject *self, PyObject *args);
 
 static char PLy_subtransaction_doc[] = {
 	"PostgreSQL subtransaction context manager"
diff --git a/src/pl/plpython/plpy_subxactobject.h b/src/pl/plpython/plpy_subxactobject.h
index 0db8aa9f3faa78fbc20223c3ffe4e82326589fe9..7e3002fc2fd039414c0cdadad720c39b689d7f0f 100644
--- a/src/pl/plpython/plpy_subxactobject.h
+++ b/src/pl/plpython/plpy_subxactobject.h
@@ -24,6 +24,6 @@ typedef struct PLySubtransactionData
 } PLySubtransactionData;
 
 extern void PLy_subtransaction_init_type(void);
-extern PyObject *PLy_subtransaction_new(PyObject *, PyObject *);
+extern PyObject *PLy_subtransaction_new(PyObject *self, PyObject *unused);
 
 #endif	/* PLPY_SUBXACTOBJECT */
diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c
index cd6a46d8da63e0faa49bf790e581f895981ba76c..d5cac9f1f0dff7b735e6f80ed70e96a95e93b763 100644
--- a/src/pl/plpython/plpy_typeio.c
+++ b/src/pl/plpython/plpy_typeio.c
@@ -26,35 +26,35 @@
 
 
 /* I/O function caching */
-static void PLy_input_datum_func2(PLyDatumToOb *, Oid, HeapTuple);
-static void PLy_output_datum_func2(PLyObToDatum *, HeapTuple);
+static void PLy_input_datum_func2(PLyDatumToOb *arg, Oid typeOid, HeapTuple typeTup);
+static void PLy_output_datum_func2(PLyObToDatum *arg, HeapTuple typeTup);
 
 /* conversion from Datums to Python objects */
-static PyObject *PLyBool_FromBool(PLyDatumToOb *, Datum);
-static PyObject *PLyFloat_FromFloat4(PLyDatumToOb *, Datum);
-static PyObject *PLyFloat_FromFloat8(PLyDatumToOb *, Datum);
-static PyObject *PLyFloat_FromNumeric(PLyDatumToOb *, Datum);
-static PyObject *PLyInt_FromInt16(PLyDatumToOb *, Datum);
-static PyObject *PLyInt_FromInt32(PLyDatumToOb *, Datum);
-static PyObject *PLyLong_FromInt64(PLyDatumToOb *, Datum);
-static PyObject *PLyBytes_FromBytea(PLyDatumToOb *, Datum);
-static PyObject *PLyString_FromDatum(PLyDatumToOb *, Datum);
-static PyObject *PLyList_FromArray(PLyDatumToOb *, Datum);
+static PyObject *PLyBool_FromBool(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyFloat_FromFloat4(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyFloat_FromFloat8(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyFloat_FromNumeric(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyInt_FromInt16(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyInt_FromInt32(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyLong_FromInt64(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyBytes_FromBytea(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyString_FromDatum(PLyDatumToOb *arg, Datum d);
+static PyObject *PLyList_FromArray(PLyDatumToOb *arg, Datum d);
 
 /* conversion from Python objects to Datums */
-static Datum PLyObject_ToBool(PLyObToDatum *, int32, PyObject *);
-static Datum PLyObject_ToBytea(PLyObToDatum *, int32, PyObject *);
-static Datum PLyObject_ToComposite(PLyObToDatum *, int32, PyObject *);
-static Datum PLyObject_ToDatum(PLyObToDatum *, int32, PyObject *);
-static Datum PLySequence_ToArray(PLyObToDatum *, int32, PyObject *);
+static Datum PLyObject_ToBool(PLyObToDatum *arg, int32 typmod, PyObject *plrv);
+static Datum PLyObject_ToBytea(PLyObToDatum *arg, int32 typmod, PyObject *plrv);
+static Datum PLyObject_ToComposite(PLyObToDatum *arg, int32 typmod, PyObject *plrv);
+static Datum PLyObject_ToDatum(PLyObToDatum *arg, int32 typmod, PyObject *plrv);
+static Datum PLySequence_ToArray(PLyObToDatum *arg, int32 typmod, PyObject *plrv);
 
 /* conversion from Python objects to heap tuples (used by triggers and SRFs) */
-static HeapTuple PLyMapping_ToTuple(PLyTypeInfo *, TupleDesc, PyObject *);
-static HeapTuple PLySequence_ToTuple(PLyTypeInfo *, TupleDesc, PyObject *);
-static HeapTuple PLyGenericObject_ToTuple(PLyTypeInfo *, TupleDesc, PyObject *);
+static HeapTuple PLyMapping_ToTuple(PLyTypeInfo *info, TupleDesc desc, PyObject *mapping);
+static HeapTuple PLySequence_ToTuple(PLyTypeInfo *info, TupleDesc desc, PyObject *sequence);
+static HeapTuple PLyGenericObject_ToTuple(PLyTypeInfo *info, TupleDesc desc, PyObject *object);
 
 /* make allocations in the TopMemoryContext */
-static void perm_fmgr_info(Oid, FmgrInfo *);
+static void perm_fmgr_info(Oid functionId, FmgrInfo *finfo);
 
 void
 PLy_typeinfo_init(PLyTypeInfo *arg)
diff --git a/src/pl/plpython/plpy_typeio.h b/src/pl/plpython/plpy_typeio.h
index 6708bf9c9b53ddc02a6fd665c3c870d9f748c9c7..e52c5d50479a63acbfa82684148febfb40a0d743 100644
--- a/src/pl/plpython/plpy_typeio.h
+++ b/src/pl/plpython/plpy_typeio.h
@@ -87,21 +87,21 @@ typedef struct PLyTypeInfo
 	ItemPointerData typrel_tid;
 } PLyTypeInfo;
 
-extern void PLy_typeinfo_init(PLyTypeInfo *);
-extern void PLy_typeinfo_dealloc(PLyTypeInfo *);
+extern void PLy_typeinfo_init(PLyTypeInfo *arg);
+extern void PLy_typeinfo_dealloc(PLyTypeInfo *arg);
 
-extern void PLy_input_datum_func(PLyTypeInfo *, Oid, HeapTuple);
-extern void PLy_output_datum_func(PLyTypeInfo *, HeapTuple);
+extern void PLy_input_datum_func(PLyTypeInfo *arg, Oid typeOid, HeapTuple typeTup);
+extern void PLy_output_datum_func(PLyTypeInfo *arg, HeapTuple typeTup);
 
-extern void PLy_input_tuple_funcs(PLyTypeInfo *, TupleDesc);
-extern void PLy_output_tuple_funcs(PLyTypeInfo *, TupleDesc);
+extern void PLy_input_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc);
+extern void PLy_output_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc);
 
-extern void PLy_output_record_funcs(PLyTypeInfo *, TupleDesc);
+extern void PLy_output_record_funcs(PLyTypeInfo *arg, TupleDesc desc);
 
 /* conversion from Python objects to heap tuples */
-extern HeapTuple PLyObject_ToTuple(PLyTypeInfo *, TupleDesc, PyObject *);
+extern HeapTuple PLyObject_ToTuple(PLyTypeInfo *info, TupleDesc desc, PyObject *plrv);
 
 /* conversion from heap tuples to Python dictionaries */
-extern PyObject *PLyDict_FromTuple(PLyTypeInfo *, HeapTuple, TupleDesc);
+extern PyObject *PLyDict_FromTuple(PLyTypeInfo *info, HeapTuple tuple, TupleDesc desc);
 
 #endif	/* PLPY_TYPEIO_H */
diff --git a/src/pl/plpython/plpy_util.h b/src/pl/plpython/plpy_util.h
index 237d6c5751fb691faf2d2ba1cdd2720b3885518a..9b9eca0050c003ddec809ae6a271325f8bfb78b7 100644
--- a/src/pl/plpython/plpy_util.h
+++ b/src/pl/plpython/plpy_util.h
@@ -6,10 +6,10 @@
 #ifndef PLPY_UTIL_H
 #define PLPY_UTIL_H
 
-extern void *PLy_malloc(size_t);
-extern void *PLy_malloc0(size_t);
-extern char *PLy_strdup(const char *);
-extern void PLy_free(void *);
+extern void *PLy_malloc(size_t bytes);
+extern void *PLy_malloc0(size_t bytes);
+extern char *PLy_strdup(const char *str);
+extern void PLy_free(void *ptr);
 
 extern PyObject *PLyUnicode_Bytes(PyObject *unicode);
 extern char *PLyUnicode_AsString(PyObject *unicode);