Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3b93fba

Browse files
committed
Remove plpython casts C source code casts:
It removes last remaining casts inside struct definitions. Such usage is bad practice, as it hides problems from compiler. Reason for the cast is popular practice in some circles to define functions as foo(MyObj *) instead of foo(PyObject *) thus avoiding a local variable inside functions and make direct calling easier. As pl/python does not use such style, the casts were unnecessary from the start. Marko Kreen
1 parent 8f296eb commit 3b93fba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/pl/plpython/plpython.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.99 2007/04/03 15:50:58 momjian Exp $
4+
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.100 2007/04/04 17:28:11 momjian Exp $
55
*
66
*********************************************************************
77
*/
@@ -1994,9 +1994,9 @@ static PyTypeObject PLy_PlanType = {
19941994
/*
19951995
* methods
19961996
*/
1997-
(destructor) PLy_plan_dealloc, /* tp_dealloc */
1997+
PLy_plan_dealloc, /* tp_dealloc */
19981998
0, /* tp_print */
1999-
(getattrfunc) PLy_plan_getattr, /* tp_getattr */
1999+
PLy_plan_getattr, /* tp_getattr */
20002000
0, /* tp_setattr */
20012001
0, /* tp_compare */
20022002
0, /* tp_repr */
@@ -2038,9 +2038,9 @@ static PyTypeObject PLy_ResultType = {
20382038
/*
20392039
* methods
20402040
*/
2041-
(destructor) PLy_result_dealloc, /* tp_dealloc */
2041+
PLy_result_dealloc, /* tp_dealloc */
20422042
0, /* tp_print */
2043-
(getattrfunc) PLy_result_getattr, /* tp_getattr */
2043+
PLy_result_getattr, /* tp_getattr */
20442044
0, /* tp_setattr */
20452045
0, /* tp_compare */
20462046
0, /* tp_repr */

0 commit comments

Comments
 (0)