CVS update: php3/functions

From: Date: Sun, 04 Oct 1998 23:25:27 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-1661@lists.php.net to get a copy of this message
Date: Sunday October 4, 1998 @ 19:25 Author: zeev Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv5152/functions Modified Files: mysql.c Log Message: The reason I didn't fix these warnings are they I *hate* messing up the code with so many repeated #define's. That's at least a bit cleaner and readable. Index: php3/functions/mysql.c diff -c php3/functions/mysql.c:1.170 php3/functions/mysql.c:1.171 *** php3/functions/mysql.c:1.170 Sun Oct 4 16:05:01 1998 --- php3/functions/mysql.c Sun Oct 4 19:25:27 1998 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: mysql.c,v 1.170 1998/10/04 20:05:01 shane Exp $ */ /* TODO: --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: mysql.c,v 1.171 1998/10/04 23:25:27 zeev Exp $ */ /* TODO: *************** *** 74,79 **** --- 74,86 ---- #define SAFE_STRING(s) ((s)?(s):"") + #if MYSQL_VERSION_ID > 32199 + #define mysql_row_length_type unsigned long + #else + #define mysql_row_length_type unsigned int + #endif + + function_entry mysql_functions[] = { {"mysql_connect", php3_mysql_connect, NULL}, {"mysql_pconnect", php3_mysql_pconnect, NULL}, *************** *** 1183,1193 **** pval *result, *row, *field=NULL; MYSQL_RES *mysql_result; MYSQL_ROW sql_row; ! #if MYSQL_VERSION_ID > 32199 ! unsigned long *sql_row_lengths; ! #else ! unsigned int *sql_row_lengths; ! #endif int type,field_offset=0; MySQL_TLS_VARS; --- 1190,1196 ---- pval *result, *row, *field=NULL; MYSQL_RES *mysql_result; MYSQL_ROW sql_row; ! mysql_row_length_type *sql_row_lengths; int type,field_offset=0; MySQL_TLS_VARS; *************** *** 1349,1359 **** pval *result; MYSQL_RES *mysql_result; MYSQL_ROW mysql_row; ! #if MYSQL_VERSION_ID > 32199 ! unsigned long *mysql_row_lengths; ! #else ! unsigned int *mysql_row_lengths; ! #endif int type; int num_fields; int i; --- 1352,1358 ---- pval *result; MYSQL_RES *mysql_result; MYSQL_ROW mysql_row; ! mysql_row_length_type *mysql_row_lengths; int type; int num_fields; int i; *************** *** 1404,1414 **** MYSQL_RES *mysql_result; MYSQL_ROW mysql_row; MYSQL_FIELD *mysql_field; ! #if MYSQL_VERSION_ID > 32199 ! unsigned long *mysql_row_lengths; ! #else ! unsigned int *mysql_row_lengths; ! #endif int type; int num_fields; int i; --- 1403,1409 ---- MYSQL_RES *mysql_result; MYSQL_ROW mysql_row; MYSQL_FIELD *mysql_field; ! mysql_row_length_type *mysql_row_lengths; int type; int num_fields; int i; *************** *** 1506,1516 **** { pval *result; MYSQL_RES *mysql_result; ! #if MYSQL_VERSION_ID > 32199 ! unsigned long *lengths; ! #else ! unsigned int *lengths; ! #endif int type; int num_fields; int i; --- 1501,1507 ---- { pval *result; MYSQL_RES *mysql_result; ! mysql_row_length_type *lengths; int type; int num_fields; int i; -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#1661) next »