]> granicus.if.org Git - php/commitdiff
Some pedantic fixes for gcc.
authorWez Furlong <wez@php.net>
Mon, 17 May 2004 17:00:35 +0000 (17:00 +0000)
committerWez Furlong <wez@php.net>
Mon, 17 May 2004 17:00:35 +0000 (17:00 +0000)
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/pdo/php_pdo_driver.h
ext/pdo/php_pdo_int.h

index a97ce4a644013480f3c7f4b2ad7372ccccacc5f8..2529506390bb5ec3609613d08648ec183ceb4bf6 100755 (executable)
@@ -392,7 +392,7 @@ static zend_object_handlers pdo_dbh_object_handlers = {
        NULL
 };
 
-static void pdo_dbh_free_storage(void *object TSRMLS_DC)
+static void pdo_dbh_free_storage(zend_object *object TSRMLS_DC)
 {
        pdo_dbh_t *dbh = (pdo_dbh_t*)object;
 
index cddd11b3c0c850b85f820ae61f76f0a06620ec45..b1fdd7694ab3aaadb83a6c7e1e867f6c469ee58d 100755 (executable)
@@ -114,8 +114,8 @@ static int describe_columns(pdo_stmt_t *stmt TSRMLS_DC)
 
 static void param_dtor(void *data)
 {
-       TSRMLS_FETCH();
        struct pdo_bound_param_data *param = (struct pdo_bound_param_data *)data;
+       TSRMLS_FETCH();
 
        /* tell the driver that it is going away */
        if (param->stmt->methods->param_hook) {
@@ -179,9 +179,9 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
 
        if (param->name) {
                param->name = estrndup(param->name, param->namelen);
-               zend_hash_update(hash, param->name, param->namelen, param, sizeof(*param), &pparam);
+               zend_hash_update(hash, param->name, param->namelen, param, sizeof(*param), (void**)&pparam);
        } else {
-               zend_hash_index_update(hash, param->paramno, param, sizeof(*param), &pparam);
+               zend_hash_index_update(hash, param->paramno, param, sizeof(*param), (void**)&pparam);
        }
 
        /* tell the driver we just created a parameter */
@@ -467,7 +467,7 @@ static PHP_METHOD(PDOStatement, rowCount)
 
 
 
-extern function_entry pdo_dbstmt_functions[] = {
+function_entry pdo_dbstmt_functions[] = {
        PHP_ME(PDOStatement, execute,           NULL,                                   ZEND_ACC_PUBLIC)
        PHP_ME(PDOStatement, fetch,                     NULL,                                   ZEND_ACC_PUBLIC)
        PHP_ME(PDOStatement, bindParam,         second_arg_force_ref,   ZEND_ACC_PUBLIC)
@@ -607,7 +607,7 @@ zend_object_handlers pdo_dbstmt_object_handlers = {
        NULL
 };
 
-void pdo_dbstmt_free_storage(void *object TSRMLS_DC)
+void pdo_dbstmt_free_storage(zend_object *object TSRMLS_DC)
 {
        pdo_stmt_t *stmt = (pdo_stmt_t*)object;
 
index 34e88404dc131dba84eb7871c891392aeb200fcb..0c2ef803f1fe681b017018282d0285734a3dfb21 100755 (executable)
 /* forward declarations */
 typedef struct _pdo_dbh_t      pdo_dbh_t;
 typedef struct _pdo_stmt_t     pdo_stmt_t;
+struct pdo_bound_param_data;
+
+#ifndef TRUE
+# define TRUE 1
+#endif
+#ifndef FALSE
+# define FALSE 0
+#endif
 
 #define PDO_DRIVER_API 20040513
 
index 5d0a3c9ee2a88afb1d6eb1a15118828c3ee56136..97e969889b95608a86db334760486872b00459c2 100755 (executable)
@@ -31,7 +31,7 @@ extern zend_class_entry *pdo_dbh_ce;
 extern zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC);
 extern function_entry pdo_dbstmt_functions[];
 extern zend_class_entry *pdo_dbstmt_ce;
-void pdo_dbstmt_free_storage(void *object TSRMLS_DC);
+void pdo_dbstmt_free_storage(zend_object *object TSRMLS_DC);
 extern zend_object_handlers pdo_dbstmt_object_handlers;
 
 extern pdo_driver_t *pdo_find_driver(const char *name, int namelen);