]> granicus.if.org Git - postgresql/commitdiff
Remove plpython casts C source code casts:
authorBruce Momjian <bruce@momjian.us>
Wed, 4 Apr 2007 17:28:11 +0000 (17:28 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 4 Apr 2007 17:28:11 +0000 (17:28 +0000)
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

src/pl/plpython/plpython.c

index 8771f60d57bc5021af2ac09dd45764b1aee3ee7d..c37fc2dac1a5488ebd9f0e82f06ec43e4b94fc53 100644 (file)
@@ -1,7 +1,7 @@
 /**********************************************************************
  * plpython.c - python as a procedural language for PostgreSQL
  *
- *     $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.99 2007/04/03 15:50:58 momjian Exp $
+ *     $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.100 2007/04/04 17:28:11 momjian Exp $
  *
  *********************************************************************
  */
@@ -1994,9 +1994,9 @@ static PyTypeObject PLy_PlanType = {
        /*
         * methods
         */
-       (destructor) PLy_plan_dealloc,          /* tp_dealloc */
+       PLy_plan_dealloc,                       /* tp_dealloc */
        0,                                                      /* tp_print */
-       (getattrfunc) PLy_plan_getattr,         /* tp_getattr */
+       PLy_plan_getattr,                       /* tp_getattr */
        0,                                                      /* tp_setattr */
        0,                                                      /* tp_compare */
        0,                                                      /* tp_repr */
@@ -2038,9 +2038,9 @@ static PyTypeObject PLy_ResultType = {
        /*
         * methods
         */
-       (destructor) PLy_result_dealloc,        /* tp_dealloc */
+       PLy_result_dealloc,                     /* tp_dealloc */
        0,                                                      /* tp_print */
-       (getattrfunc) PLy_result_getattr,       /* tp_getattr */
+       PLy_result_getattr,                     /* tp_getattr */
        0,                                                      /* tp_setattr */
        0,                                                      /* tp_compare */
        0,                                                      /* tp_repr */