CVS update: php3/functions

From: Date: Thu, 10 Sep 1998 23:57:24 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-950@lists.php.net to get a copy of this message
Date: Thursday September 10, 1998 @ 19:57 Author: zeev Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv29994/functions Modified Files: basic_functions.c browscap.c crypt.c dns.c exec.c fsock.c hw.c msql.c mysql.c oracle.c pgsql.c post.c reg.c string.c sybase-ct.c sybase.c unified_odbc.c Log Message: Clean all remaining leftovers from yystype, convert to pval and fix capitalization on macros Index: php3/functions/basic_functions.c diff -c php3/functions/basic_functions.c:1.215 php3/functions/basic_functions.c:1.216 *** php3/functions/basic_functions.c:1.215 Sun Sep 6 11:12:35 1998 --- php3/functions/basic_functions.c Thu Sep 10 19:57:17 1998 *************** *** 558,564 **** } convert_to_string(num); *return_value = *num; ! yystype_copy_constructor(return_value); } static int array_key_compare(const void *a, const void *b) --- 558,564 ---- } convert_to_string(num); *return_value = *num; ! pval_copy_constructor(return_value); } static int array_key_compare(const void *a, const void *b) *************** *** 889,895 **** } } *return_value = *entry; ! yystype_copy_constructor(return_value); } --- 889,895 ---- } } *return_value = *entry; ! pval_copy_constructor(return_value); } *************** *** 912,918 **** } while (entry->type==IS_STRING && entry->value.str.val==undefined_variable_string); *return_value = *entry; ! yystype_copy_constructor(return_value); } void array_next(INTERNAL_FUNCTION_PARAMETERS) --- 912,918 ---- } while (entry->type==IS_STRING && entry->value.str.val==undefined_variable_string); *return_value = *entry; ! pval_copy_constructor(return_value); } void array_next(INTERNAL_FUNCTION_PARAMETERS) *************** *** 934,940 **** } while (entry->type==IS_STRING && entry->value.str.val==undefined_variable_string); *return_value = *entry; ! yystype_copy_constructor(return_value); } void array_each(INTERNAL_FUNCTION_PARAMETERS) --- 934,940 ---- } while (entry->type==IS_STRING && entry->value.str.val==undefined_variable_string); *return_value = *entry; ! pval_copy_constructor(return_value); } void array_each(INTERNAL_FUNCTION_PARAMETERS) *************** *** 965,971 **** } array_init(return_value); real_entry = *entry; ! yystype_copy_constructor(&real_entry); _php3_hash_index_update(return_value->value.ht,1,(void *) &real_entry,sizeof(pval),(void **) &inserted_pointer); _php3_hash_pointer_update(return_value->value.ht, "value", sizeof("value"), (void *) inserted_pointer); switch (_php3_hash_get_current_key(array->value.ht, &string_key, &int_key)) { --- 965,971 ---- } array_init(return_value); real_entry = *entry; ! pval_copy_constructor(&real_entry); _php3_hash_index_update(return_value->value.ht,1,(void *) &real_entry,sizeof(pval),(void **) &inserted_pointer); _php3_hash_pointer_update(return_value->value.ht, "value", sizeof("value"), (void *) inserted_pointer); switch (_php3_hash_get_current_key(array->value.ht, &string_key, &int_key)) { *************** *** 1004,1010 **** } *return_value = *entry; ! yystype_copy_constructor(return_value); } void array_current(INTERNAL_FUNCTION_PARAMETERS) --- 1004,1010 ---- } *return_value = *entry; ! pval_copy_constructor(return_value); } void array_current(INTERNAL_FUNCTION_PARAMETERS) *************** *** 1022,1028 **** return; } *return_value = *entry; ! yystype_copy_constructor(return_value); } --- 1022,1028 ---- return; } *return_value = *entry; ! pval_copy_constructor(return_value); } *************** *** 1198,1204 **** } if (_php3_hash_minmax(arr->value.ht, array_data_compare, 0, (void **) &result)==SUCCESS) { *return_value = *result; ! yystype_copy_constructor(return_value); } else { php3_error(E_WARNING, "min: array must contain at least 1 element"); var_uninit(return_value); --- 1198,1204 ---- } if (_php3_hash_minmax(arr->value.ht, array_data_compare, 0, (void **) &result)==SUCCESS) { *return_value = *result; ! pval_copy_constructor(return_value); } else { php3_error(E_WARNING, "min: array must contain at least 1 element"); var_uninit(return_value); *************** *** 1206,1212 **** } else { if (_php3_hash_minmax(ht, array_data_compare, 0, (void **) &result)==SUCCESS) { *return_value = *result; ! yystype_copy_constructor(return_value); } } } --- 1206,1212 ---- } else { if (_php3_hash_minmax(ht, array_data_compare, 0, (void **) &result)==SUCCESS) { *return_value = *result; ! pval_copy_constructor(return_value); } } } *************** *** 1232,1238 **** } if (_php3_hash_minmax(arr->value.ht, array_data_compare, 1, (void **) &result)==SUCCESS) { *return_value = *result; ! yystype_copy_constructor(return_value); } else { php3_error(E_WARNING, "max: array must contain at least 1 element"); var_uninit(return_value); --- 1232,1238 ---- } if (_php3_hash_minmax(arr->value.ht, array_data_compare, 1, (void **) &result)==SUCCESS) { *return_value = *result; ! pval_copy_constructor(return_value); } else { php3_error(E_WARNING, "max: array must contain at least 1 element"); var_uninit(return_value); *************** *** 1240,1246 **** } else { if (_php3_hash_minmax(ht, array_data_compare, 1, (void **) &result)==SUCCESS) { *return_value = *result; ! yystype_copy_constructor(return_value); } } } --- 1240,1246 ---- } else { if (_php3_hash_minmax(ht, array_data_compare, 1, (void **) &result)==SUCCESS) { *return_value = *result; ! pval_copy_constructor(return_value); } } } *************** *** 1600,1608 **** pval retval; if (call_user_function(&GLOBAL(function_table), NULL, user_shutdown_function_name, &retval, 0, NULL)==SUCCESS) { ! yystype_destructor(&retval); } ! yystype_destructor(user_shutdown_function_name); } --- 1600,1608 ---- pval retval; if (call_user_function(&GLOBAL(function_table), NULL, user_shutdown_function_name, &retval, 0, NULL)==SUCCESS) { ! pval_destructor(&retval); } ! pval_destructor(user_shutdown_function_name); } *************** *** 1635,1641 **** } shutdown_function_name = *arg; ! yystype_copy_constructor(&shutdown_function_name); _php3_hash_next_index_insert(user_shutdown_function_names, &shutdown_function_name, sizeof(pval), NULL); } --- 1635,1641 ---- } shutdown_function_name = *arg; ! pval_copy_constructor(&shutdown_function_name); _php3_hash_next_index_insert(user_shutdown_function_names, &shutdown_function_name, sizeof(pval), NULL); } Index: php3/functions/browscap.c diff -c php3/functions/browscap.c:1.17 php3/functions/browscap.c:1.18 *** php3/functions/browscap.c:1.17 Mon Jun 22 16:28:29 1998 --- php3/functions/browscap.c Thu Sep 10 19:57:17 1998 *************** *** 115,128 **** *return_value = *agent; return_value->type = IS_OBJECT; ! yystype_copy_constructor(return_value); ! return_value->value.ht->pDestructor = pval_DESTRUCTOR; while (_php3_hash_find(agent->value.ht, "parent", sizeof("parent"), (void **) &agent_name)==SUCCESS) { if (_php3_hash_find(&GLOBAL(browser_hash), agent_name->value.str.val, agent_name->value.str.len+1, (void **) &agent)==FAILURE) { break; } ! _php3_hash_merge(return_value->value.ht,agent->value.ht,(void (*)(void *pData)) yystype_copy_constructor, (void *) &tmp, sizeof(pval)); } } --- 115,128 ---- *return_value = *agent; return_value->type = IS_OBJECT; ! pval_copy_constructor(return_value); ! return_value->value.ht->pDestructor = PVAL_DESTRUCTOR; while (_php3_hash_find(agent->value.ht, "parent", sizeof("parent"), (void **) &agent_name)==SUCCESS) { if (_php3_hash_find(&GLOBAL(browser_hash), agent_name->value.str.val, agent_name->value.str.len+1, (void **) &agent)==FAILURE) { break; } ! _php3_hash_merge(return_value->value.ht,agent->value.ht,(void (*)(void *pData)) pval_copy_constructor, (void *) &tmp, sizeof(pval)); } } Index: php3/functions/crypt.c diff -c php3/functions/crypt.c:1.34 php3/functions/crypt.c:1.35 *** php3/functions/crypt.c:1.34 Fri May 15 06:57:19 1998 --- php3/functions/crypt.c Thu Sep 10 19:57:17 1998 *************** *** 26,32 **** | Authors: Stig Bakken | +----------------------------------------------------------------------+ */ ! /* $Id: crypt.c,v 1.34 1998/05/15 10:57:19 zeev Exp $ */ #include "php.h" #include "internal_functions.h" --- 26,32 ---- | Authors: Stig Bakken | +----------------------------------------------------------------------+ */ ! /* $Id: crypt.c,v 1.35 1998/09/10 23:57:17 zeev Exp $ */ #include "php.h" #include "internal_functions.h" *************** *** 95,101 **** return_value->value.str.val = (char *) crypt(arg1->value.str.val, salt); return_value->value.str.len = strlen(return_value->value.str.val); /* can be optimized away to 13? */ return_value->type = IS_STRING; ! yystype_copy_constructor(return_value); } #endif --- 95,101 ---- return_value->value.str.val = (char *) crypt(arg1->value.str.val, salt); return_value->value.str.len = strlen(return_value->value.str.val); /* can be optimized away to 13? */ return_value->type = IS_STRING; ! pval_copy_constructor(return_value); } #endif Index: php3/functions/dns.c diff -c php3/functions/dns.c:1.46 php3/functions/dns.c:1.47 *** php3/functions/dns.c:1.46 Thu Jun 25 17:41:21 1998 --- php3/functions/dns.c Thu Sep 10 19:57:17 1998 *************** *** 28,34 **** +----------------------------------------------------------------------+ */ ! /* $Id: dns.c,v 1.46 1998/06/25 21:41:21 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 28,34 ---- +----------------------------------------------------------------------+ */ ! /* $Id: dns.c,v 1.47 1998/09/10 23:57:17 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 260,266 **** RETURN_FALSE; } need_weight = 1; ! yystype_destructor(weight_list _INLINE_TLS); /* start with clean array */ if ( array_init(weight_list) == FAILURE ) { RETURN_FALSE; } --- 260,266 ---- RETURN_FALSE; } need_weight = 1; ! pval_destructor(weight_list _INLINE_TLS); /* start with clean array */ if ( array_init(weight_list) == FAILURE ) { RETURN_FALSE; } *************** *** 270,276 **** } convert_to_string( host ); ! yystype_destructor(mx_list _INLINE_TLS); /* start with clean array */ if ( array_init(mx_list) == FAILURE ) { RETURN_FALSE; } --- 270,276 ---- } convert_to_string( host ); ! pval_destructor(mx_list _INLINE_TLS); /* start with clean array */ if ( array_init(mx_list) == FAILURE ) { RETURN_FALSE; } Index: php3/functions/exec.c diff -c php3/functions/exec.c:1.77 php3/functions/exec.c:1.78 *** php3/functions/exec.c:1.77 Mon Jul 27 18:07:08 1998 --- php3/functions/exec.c Thu Sep 10 19:57:18 1998 *************** *** 26,32 **** | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ ! /* $Id: exec.c,v 1.77 1998/07/27 22:07:08 shane Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 26,32 ---- | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ ! /* $Id: exec.c,v 1.78 1998/09/10 23:57:18 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 117,123 **** } if (type==2) { if (array->type != IS_ARRAY) { ! yystype_destructor(array _INLINE_TLS); array_init(array); } } --- 117,123 ---- } if (type==2) { if (array->type != IS_ARRAY) { ! pval_destructor(array _INLINE_TLS); array_init(array); } } Index: php3/functions/fsock.c diff -c php3/functions/fsock.c:1.73 php3/functions/fsock.c:1.74 *** php3/functions/fsock.c:1.73 Sat May 30 18:59:24 1998 --- php3/functions/fsock.c Thu Sep 10 19:57:18 1998 *************** *** 27,33 **** | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: fsock.c,v 1.73 1998/05/30 22:59:24 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 27,33 ---- | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ ! /* $Id: fsock.c,v 1.74 1998/09/10 23:57:18 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 119,125 **** if(!ParameterPassedByReference(ht,4)) { php3_error(E_WARNING,"error string argument to fsockopen not passed by reference"); } ! yystype_copy_constructor(args[3]); args[3]->value.str.val = empty_string; args[3]->value.str.len = 0; args[3]->type = IS_STRING; --- 119,125 ---- if(!ParameterPassedByReference(ht,4)) { php3_error(E_WARNING,"error string argument to fsockopen not passed by reference"); } ! pval_copy_constructor(args[3]); args[3]->value.str.val = empty_string; args[3]->value.str.len = 0; args[3]->type = IS_STRING; Index: php3/functions/hw.c diff -c php3/functions/hw.c:1.8 php3/functions/hw.c:1.9 *** php3/functions/hw.c:1.8 Thu Sep 10 16:22:35 1998 --- php3/functions/hw.c Thu Sep 10 19:57:18 1998 *************** *** 23,29 **** +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.8 1998/09/10 20:22:35 zeev Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif --- 23,29 ---- +----------------------------------------------------------------------+ */ ! /* $Id: hw.c,v 1.9 1998/09/10 23:57:18 zeev Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif *************** *** 167,175 **** * Also adds as an assoc. array at the end of the return array with * statistics. */ ! int make_return_objrec(YYSTYPE **return_value, char **objrecs, int count) { ! YYSTYPE stat_arr; int i; int hidden, collhead, fullcollhead, total; int collheadnr, fullcollheadnr; --- 167,175 ---- * Also adds as an assoc. array at the end of the return array with * statistics. */ ! int make_return_objrec(pval **return_value, char **objrecs, int count) { ! pval stat_arr; int i; int hidden, collhead, fullcollhead, total; int collheadnr, fullcollheadnr; *************** *** 218,224 **** add_assoc_long(&stat_arr, "FullCollectionHeadNr", fullcollheadnr); /* Add the stat array */ ! _php3_hash_next_index_insert((*return_value)->value.ht, &stat_arr, sizeof(YYSTYPE), NULL); /* The title array can now be freed, but I don't know how */ return 0; --- 218,224 ---- add_assoc_long(&stat_arr, "FullCollectionHeadNr", fullcollheadnr); /* Add the stat array */ ! _php3_hash_next_index_insert((*return_value)->value.ht, &stat_arr, sizeof(pval), NULL); /* The title array can now be freed, but I don't know how */ return 0; *************** *** 227,234 **** /* ** creates an array return value from object record */ ! int make_return_array_from_objrec(YYSTYPE **return_value, char *objrec) { ! YYSTYPE title_arr, desc_arr; char *attrname, *str, *temp, language[3], *title; int iTitle, iDesc; int hasTitle = 0; --- 227,234 ---- /* ** creates an array return value from object record */ ! int make_return_array_from_objrec(pval **return_value, char *objrec) { ! pval title_arr, desc_arr; char *attrname, *str, *temp, language[3], *title; int iTitle, iDesc; int hasTitle = 0; *************** *** 294,307 **** /* Add the title array, if we have one */ if(hasTitle) { ! _php3_hash_update((*return_value)->value.ht, "Title", 6, &title_arr, sizeof(YYSTYPE), NULL); /* The title array can now be freed, but I don't know how */ } if(hasDescription) { /* Add the description array, if we have one */ ! _php3_hash_update((*return_value)->value.ht, "Description", 12, &desc_arr, sizeof(YYSTYPE), NULL); /* The description array can now be freed, but I don't know how */ } --- 294,307 ---- /* Add the title array, if we have one */ if(hasTitle) { ! _php3_hash_update((*return_value)->value.ht, "Title", 6, &title_arr, sizeof(pval), NULL); /* The title array can now be freed, but I don't know how */ } if(hasDescription) { /* Add the description array, if we have one */ ! _php3_hash_update((*return_value)->value.ht, "Description", 12, &desc_arr, sizeof(pval), NULL); /* The description array can now be freed, but I don't know how */ } *************** *** 330,336 **** static char * make_objrec_from_array(HashTable *lht) { int i, count, keytype, length; char *key, str[1024], *objrec = NULL; ! YYSTYPE *keydata; if(NULL == lht) return NULL; --- 330,336 ---- static char * make_objrec_from_array(HashTable *lht) { int i, count, keytype, length; char *key, str[1024], *objrec = NULL; ! pval *keydata; if(NULL == lht) return NULL; *************** *** 365,371 **** static int * make_ints_from_array(HashTable *lht) { int i, count; int *objrec = NULL; ! YYSTYPE *keydata; if(NULL == lht) return NULL; --- 365,371 ---- static int * make_ints_from_array(HashTable *lht) { int i, count; int *objrec = NULL; ! pval *keydata; if(NULL == lht) return NULL; *************** *** 411,417 **** static void php3_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { ! YYSTYPE *argv[4]; int argc; int sockfd; int port = 0; --- 411,417 ---- static void php3_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { ! pval *argv[4]; int argc; int sockfd; int port = 0; *************** *** 698,704 **** } void php3_hw_close(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_connection *ptr; TLS_VARS; --- 698,704 ---- } void php3_hw_close(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_connection *ptr; TLS_VARS; *************** *** 719,725 **** void php3_hw_info(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_connection *ptr; char *str; --- 719,725 ---- void php3_hw_info(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_connection *ptr; char *str; *************** *** 750,756 **** void php3_hw_error(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_connection *ptr; TLS_VARS; --- 750,756 ---- void php3_hw_error(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_connection *ptr; TLS_VARS; *************** *** 770,776 **** void php3_hw_errormsg(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_connection *ptr; char errstr[100]; --- 770,776 ---- void php3_hw_errormsg(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_connection *ptr; char errstr[100]; *************** *** 862,868 **** } char *php3_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { ! YYSTYPE *arg1; int link, type; hw_connection *ptr; TLS_VARS; --- 862,868 ---- } char *php3_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { ! pval *arg1; int link, type; hw_connection *ptr; TLS_VARS; *************** *** 901,907 **** } void php3_hw_who(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE user_arr; char *object, *ptr, *temp, *attrname; int i; --- 901,907 ---- } void php3_hw_who(INTERNAL_FUNCTION_PARAMETERS) { ! pval user_arr; char *object, *ptr, *temp, *attrname; int i; *************** *** 997,1003 **** add_assoc_string(&user_arr, "TotalTime", name, 1); /* Add the user array */ ! _php3_hash_index_update(return_value->value.ht, i++, &user_arr, sizeof(YYSTYPE), NULL); /* The user array can now be freed, but I don't know how */ --- 997,1003 ---- add_assoc_string(&user_arr, "TotalTime", name, 1); /* Add the user array */ ! _php3_hash_index_update(return_value->value.ht, i++, &user_arr, sizeof(pval), NULL); /* The user array can now be freed, but I don't know how */ *************** *** 1009,1015 **** } void php3_hw_dummy(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, id, type, msgid; hw_connection *ptr; TLS_VARS; --- 1009,1015 ---- } void php3_hw_dummy(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, id, type, msgid; hw_connection *ptr; TLS_VARS; *************** *** 1043,1049 **** } void php3_hw_getobject(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 1043,1049 ---- } void php3_hw_getobject(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 1076,1082 **** } void php3_hw_insertobject(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, type; char *objrec, *parms; hw_connection *ptr; --- 1076,1082 ---- } void php3_hw_insertobject(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, type; char *objrec, *parms; hw_connection *ptr; *************** *** 1108,1114 **** } void php3_hw_getandlock(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 1108,1114 ---- } void php3_hw_getandlock(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 1153,1159 **** } void php3_hw_unlock(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 1153,1159 ---- } void php3_hw_unlock(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 1179,1185 **** } void php3_hw_deleteobject(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 1179,1185 ---- } void php3_hw_deleteobject(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 1204,1210 **** } void php3_hw_changeobject(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, id, type, i; hw_connection *ptr; char *modification, *oldobjrec, buf[200]; --- 1204,1210 ---- } void php3_hw_changeobject(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, id, type, i; hw_connection *ptr; char *modification, *oldobjrec, buf[200]; *************** *** 1234,1240 **** modification = strdup(""); for(i=0; i<_php3_hash_num_elements(newobjarr); i++) { char *key, *str, *str1, newattribute[200]; ! YYSTYPE *data; int j, ind, noinsert=1; _php3_hash_get_current_key(newobjarr, &key, &ind); --- 1234,1240 ---- modification = strdup(""); for(i=0; i<_php3_hash_num_elements(newobjarr); i++) { char *key, *str, *str1, newattribute[200]; ! pval *data; int j, ind, noinsert=1; _php3_hash_get_current_key(newobjarr, &key, &ind); *************** *** 1283,1289 **** } void php3_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) { ! YYSTYPE *arg1, *arg2, *arg3, *arg4, **objvIDs; int link, type, dest=0, from=0; HashTable *src_arr; hw_connection *ptr; --- 1283,1289 ---- } void php3_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) { ! pval *arg1, *arg2, *arg3, *arg4, **objvIDs; int link, type, dest=0, from=0; HashTable *src_arr; hw_connection *ptr; *************** *** 1324,1330 **** set_swap(ptr->swap_on); ! if(NULL == (objvIDs = emalloc(_php3_hash_num_elements(src_arr) * sizeof(YYSTYPE *)))) { RETURN_FALSE; } --- 1324,1330 ---- set_swap(ptr->swap_on); ! if(NULL == (objvIDs = emalloc(_php3_hash_num_elements(src_arr) * sizeof(pval *)))) { RETURN_FALSE; } *************** *** 1389,1395 **** } void php3_hw_gettext(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *argv[3]; int argc, link, id, type, mode; int rootid = 0; hw_document *doc; --- 1389,1395 ---- } void php3_hw_gettext(INTERNAL_FUNCTION_PARAMETERS) { ! pval *argv[3]; int argc, link, id, type, mode; int rootid = 0; hw_document *doc; *************** *** 1439,1445 **** } void php3_hw_edittext(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, doc, type; hw_connection *ptr; hw_document *docptr; --- 1439,1445 ---- } void php3_hw_edittext(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, doc, type; hw_connection *ptr; hw_document *docptr; *************** *** 1474,1480 **** } void php3_hw_getcgi(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_document *doc; hw_connection *ptr; --- 1474,1480 ---- } void php3_hw_getcgi(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_document *doc; hw_connection *ptr; *************** *** 1526,1532 **** } void php3_hw_getremote(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_document *doc; hw_connection *ptr; --- 1526,1532 ---- } void php3_hw_getremote(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_document *doc; hw_connection *ptr; *************** *** 1564,1570 **** } void php3_hw_getremotechildren(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, type, i; hw_connection *ptr; char *objrec; --- 1564,1570 ---- } void php3_hw_getremotechildren(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, type, i; hw_connection *ptr; char *objrec; *************** *** 1620,1626 **** } void php3_hw_setlinkroot(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, type, rootid; hw_connection *ptr; TLS_VARS; --- 1620,1626 ---- } void php3_hw_setlinkroot(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, type, rootid; hw_connection *ptr; TLS_VARS; *************** *** 1643,1649 **** } void php3_hw_pipedocument(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *argv[3]; int link, id, type, argc, mode; int rootid = 0; hw_connection *ptr; --- 1643,1649 ---- } void php3_hw_pipedocument(INTERNAL_FUNCTION_PARAMETERS) { ! pval *argv[3]; int link, id, type, argc, mode; int rootid = 0; hw_connection *ptr; *************** *** 1709,1715 **** } void php3_hw_pipecgi(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; hw_document *doc; --- 1709,1715 ---- } void php3_hw_pipecgi(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; hw_document *doc; *************** *** 1763,1769 **** } void php3_hw_insertdocument(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, id, doc, type; hw_connection *ptr; hw_document *docptr; --- 1763,1769 ---- } void php3_hw_insertdocument(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, id, doc, type; hw_connection *ptr; hw_document *docptr; *************** *** 1800,1806 **** } void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; hw_document *doc; if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) { --- 1800,1806 ---- } void php3_hw_new_document(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; hw_document *doc; if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) { *************** *** 1822,1828 **** } void php3_hw_free_document(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_document *ptr; TLS_VARS; --- 1822,1828 ---- } void php3_hw_free_document(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_document *ptr; TLS_VARS; *************** *** 1842,1848 **** } void php3_hw_output_document(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type, count; hw_document *ptr; char *ptr1; --- 1842,1848 ---- } void php3_hw_output_document(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type, count; hw_document *ptr; char *ptr1; *************** *** 1872,1878 **** } void php3_hw_document_bodytag(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *argv[2]; int id, type, argc; hw_document *ptr; char *temp, *str = NULL; --- 1872,1878 ---- } void php3_hw_document_bodytag(INTERNAL_FUNCTION_PARAMETERS) { ! pval *argv[2]; int id, type, argc; hw_document *ptr; char *temp, *str = NULL; *************** *** 1910,1916 **** } void php3_hw_document_content(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *argv[1]; int id, type, argc; hw_document *ptr; TLS_VARS; --- 1910,1916 ---- } void php3_hw_document_content(INTERNAL_FUNCTION_PARAMETERS) { ! pval *argv[1]; int id, type, argc; hw_document *ptr; TLS_VARS; *************** *** 1934,1940 **** } void php3_hw_document_size(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_document *ptr; TLS_VARS; --- 1934,1940 ---- } void php3_hw_document_size(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_document *ptr; TLS_VARS; *************** *** 1954,1960 **** } void php3_hw_document_attributes(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int id, type; hw_document *ptr; TLS_VARS; --- 1954,1960 ---- } void php3_hw_document_attributes(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int id, type; hw_document *ptr; TLS_VARS; *************** *** 1975,1981 **** } void php3_hw_getparentsobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; --- 1975,1981 ---- } void php3_hw_getparentsobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; *************** *** 2008,2014 **** } void php3_hw_getparents(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; --- 2008,2014 ---- } void php3_hw_getparents(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; *************** *** 2051,2057 **** } void php3_hw_children(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; --- 2051,2057 ---- } void php3_hw_children(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; *************** *** 2094,2100 **** } void php3_hw_childrenobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; --- 2094,2100 ---- } void php3_hw_childrenobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; *************** *** 2127,2133 **** } void php3_hw_getchildcoll(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; --- 2127,2133 ---- } void php3_hw_getchildcoll(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; hw_connection *ptr; *************** *** 2170,2176 **** } void php3_hw_getchildcollobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; --- 2170,2176 ---- } void php3_hw_getchildcollobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; *************** *** 2203,2209 **** } void php3_hw_docbyanchor(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 2203,2209 ---- } void php3_hw_docbyanchor(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 2232,2238 **** } void php3_hw_docbyanchorobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; --- 2232,2238 ---- } void php3_hw_docbyanchorobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; hw_connection *ptr; TLS_VARS; *************** *** 2262,2268 **** } void php3_hw_getobjectbyquery(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, type, maxhits; char *query; int count, i; --- 2262,2268 ---- } void php3_hw_getobjectbyquery(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, type, maxhits; char *query; int count, i; *************** *** 2303,2309 **** } void php3_hw_getobjectbyqueryobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, type, maxhits; char *query; int count; --- 2303,2309 ---- } void php3_hw_getobjectbyqueryobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, type, maxhits; char *query; int count; *************** *** 2339,2345 **** } void php3_hw_getobjectbyquerycoll(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3, *arg4; int link, id, type, maxhits; char *query; int count, i; --- 2339,2345 ---- } void php3_hw_getobjectbyquerycoll(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3, *arg4; int link, id, type, maxhits; char *query; int count, i; *************** *** 2382,2388 **** } void php3_hw_getobjectbyquerycollobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3, *arg4; int link, id, type, maxhits; char *query; int count; --- 2382,2388 ---- } void php3_hw_getobjectbyquerycollobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3, *arg4; int link, id, type, maxhits; char *query; int count; *************** *** 2420,2426 **** } void php3_hw_getchilddoccoll(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count, i; int *childIDs = NULL; --- 2420,2426 ---- } void php3_hw_getchilddoccoll(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count, i; int *childIDs = NULL; *************** *** 2457,2463 **** } void php3_hw_getchilddoccollobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; --- 2457,2463 ---- } void php3_hw_getchilddoccollobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; char **childObjRecs = NULL; *************** *** 2490,2496 **** } void php3_hw_getanchors(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count, i; int *anchorIDs = NULL; --- 2490,2496 ---- } void php3_hw_getanchors(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count, i; int *anchorIDs = NULL; *************** *** 2527,2533 **** } void php3_hw_getanchorsobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, id, type; int count; char **anchorObjRecs = NULL; --- 2527,2533 ---- } void php3_hw_getanchorsobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, id, type; int count; char **anchorObjRecs = NULL; *************** *** 2559,2565 **** } void php3_hw_getusername(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; int link, type; hw_connection *ptr; TLS_VARS; --- 2559,2565 ---- } void php3_hw_getusername(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; int link, type; hw_connection *ptr; TLS_VARS; *************** *** 2582,2588 **** void php3_hw_identify(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; int link, type; char *name, *passwd, *userdata; hw_connection *ptr; --- 2582,2588 ---- void php3_hw_identify(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; int link, type; char *name, *passwd, *userdata; hw_connection *ptr; *************** *** 2629,2635 **** } void php3_hw_objrec2array(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; TLS_VARS; if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) { --- 2629,2635 ---- } void php3_hw_objrec2array(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; TLS_VARS; if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE) { *************** *** 2640,2646 **** } void php3_hw_array2objrec(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; char *objrec, *retobj; TLS_VARS; --- 2640,2646 ---- } void php3_hw_array2objrec(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; char *objrec, *retobj; TLS_VARS; *************** *** 2658,2664 **** } void php3_hw_incollections(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3, *arg4; int type, link, i; hw_connection *ptr; int cobjids, ccollids, *objectIDs, *collIDs, cretids, *retIDs, retcoll; --- 2658,2664 ---- } void php3_hw_incollections(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3, *arg4; int type, link, i; hw_connection *ptr; int cobjids, ccollids, *objectIDs, *collIDs, cretids, *retIDs, retcoll; *************** *** 2717,2723 **** } void php3_hw_inscoll(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3; char *objrec; int id, newid, type, link; hw_connection *ptr; --- 2717,2723 ---- } void php3_hw_inscoll(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3; char *objrec; int id, newid, type, link; hw_connection *ptr; *************** *** 2753,2759 **** } void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *argv[4]; char *objrec, *text; int id, newid, type, link, argc; hw_connection *ptr; --- 2753,2759 ---- } void php3_hw_insdoc(INTERNAL_FUNCTION_PARAMETERS) { ! pval *argv[4]; char *objrec, *text; int id, newid, type, link, argc; hw_connection *ptr; *************** *** 2793,2799 **** } void php3_hw_getsrcbydestobj(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2; int link, type, id; int count; char **childObjRecs = NULL; --- 2793,2799 ---- } void php3_hw_getsrcbydestobj(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2; int link, type, id; int count; char **childObjRecs = NULL; *************** *** 2825,2831 **** } void php3_hw_getrellink(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1, *arg2, *arg3, *arg4; int link, type; int rootid, destid, sourceid; char *anchorstr; --- 2825,2831 ---- } void php3_hw_getrellink(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1, *arg2, *arg3, *arg4; int link, type; int rootid, destid, sourceid; char *anchorstr; *************** *** 2866,2872 **** void php3_hw_connection_info(INTERNAL_FUNCTION_PARAMETERS) { ! YYSTYPE *arg1; hw_connection *ptr; int link, type; --- 2866,2872 ---- void php3_hw_connection_info(INTERNAL_FUNCTION_PARAMETERS) { ! pval *arg1; hw_connection *ptr; int link, type; Index: php3/functions/msql.c diff -c php3/functions/msql.c:1.95 php3/functions/msql.c:1.96 *** php3/functions/msql.c:1.95 Mon Jun 22 16:28:33 1998 --- php3/functions/msql.c Thu Sep 10 19:57:19 1998 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: msql.c,v 1.95 1998/06/22 20:28:33 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: msql.c,v 1.96 1998/09/10 23:57:19 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 1040,1046 **** int type; int num_fields; int i; ! pval *yystype_ptr; MSQL_TLS_VARS; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) { --- 1040,1046 ---- int type; int num_fields; int i; ! pval *pval_ptr; MSQL_TLS_VARS; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) { *************** *** 1068,1081 **** for (msql_field=msqlFetchField(msql_result),i=0; msql_field; msql_field=msqlFetchField(msql_result),i++) { if (msql_row[i]) { if (php3_ini.magic_quotes_runtime) { ! add_get_index_string(return_value, i, _php3_addslashes(msql_row[i],0,NULL,0), (void **) &yystype_ptr, 0); } else { ! add_get_index_string(return_value, i, msql_row[i], (void **) &yystype_ptr, 1); } } else { ! add_get_index_stringl(return_value, i, empty_string, 0, (void **) &yystype_ptr, 1); } ! _php3_hash_pointer_update(return_value->value.ht, msql_field->name, strlen(msql_field->name)+1, yystype_ptr); } } --- 1068,1081 ---- for (msql_field=msqlFetchField(msql_result),i=0; msql_field; msql_field=msqlFetchField(msql_result),i++) { if (msql_row[i]) { if (php3_ini.magic_quotes_runtime) { ! add_get_index_string(return_value, i, _php3_addslashes(msql_row[i],0,NULL,0), (void **) &pval_ptr, 0); } else { ! add_get_index_string(return_value, i, msql_row[i], (void **) &pval_ptr, 1); } } else { ! add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr, 1); } ! _php3_hash_pointer_update(return_value->value.ht, msql_field->name, strlen(msql_field->name)+1, pval_ptr); } } Index: php3/functions/mysql.c diff -c php3/functions/mysql.c:1.164 php3/functions/mysql.c:1.165 *** php3/functions/mysql.c:1.164 Mon Jul 27 18:07:09 1998 --- php3/functions/mysql.c Thu Sep 10 19:57:19 1998 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: mysql.c,v 1.164 1998/07/27 22:07:09 shane Exp $ */ /* TODO: --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: mysql.c,v 1.165 1998/09/10 23:57:19 zeev Exp $ */ /* TODO: *************** *** 1363,1369 **** int type; int num_fields; int i; ! pval *yystype_ptr; MySQL_TLS_VARS; --- 1363,1369 ---- int type; int num_fields; int i; ! pval *pval_ptr; MySQL_TLS_VARS; *************** *** 1396,1409 **** int len; char *tmp=_php3_addslashes(mysql_row[i],mysql_row_lengths[i],&len,0); ! add_get_index_stringl(return_value, i, tmp, len, (void **) &yystype_ptr, 0); } else { ! add_get_index_stringl(return_value, i, mysql_row[i], mysql_row_lengths[i], (void **) &yystype_ptr, 1); } ! _php3_hash_pointer_update(return_value->value.ht, mysql_field->name, strlen(mysql_field->name)+1, yystype_ptr); } else { /* NULL field, don't set it */ ! /* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &yystype_ptr); */ } } } --- 1396,1409 ---- int len; char *tmp=_php3_addslashes(mysql_row[i],mysql_row_lengths[i],&len,0); ! add_get_index_stringl(return_value, i, tmp, len, (void **) &pval_ptr, 0); } else { ! add_get_index_stringl(return_value, i, mysql_row[i], mysql_row_lengths[i], (void **) &pval_ptr, 1); } ! _php3_hash_pointer_update(return_value->value.ht, mysql_field->name, strlen(mysql_field->name)+1, pval_ptr); } else { /* NULL field, don't set it */ ! /* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr); */ } } } Index: php3/functions/oracle.c diff -c php3/functions/oracle.c:1.79 php3/functions/oracle.c:1.80 *** php3/functions/oracle.c:1.79 Wed Sep 9 08:38:08 1998 --- php3/functions/oracle.c Thu Sep 10 19:57:20 1998 *************** *** 781,787 **** if (!cursor->params || _php3_hash_init(cursor->params, 19, NULL, NULL, 0) == ! /* (void (*)(void *))yystype_ora_param_destructor, 0) == */ FAILURE){ php3_error(E_ERROR, "Unable to initialize parameter list"); RETURN_FALSE; --- 781,787 ---- if (!cursor->params || _php3_hash_init(cursor->params, 19, NULL, NULL, 0) == ! /* (void (*)(void *))pval_ora_param_destructor, 0) == */ FAILURE){ php3_error(E_ERROR, "Unable to initialize parameter list"); RETURN_FALSE; Index: php3/functions/pgsql.c diff -c php3/functions/pgsql.c:1.69 php3/functions/pgsql.c:1.70 *** php3/functions/pgsql.c:1.69 Thu Jul 30 19:04:46 1998 --- php3/functions/pgsql.c Thu Sep 10 19:57:20 1998 *************** *** 28,34 **** +----------------------------------------------------------------------+ */ ! /* $Id: pgsql.c,v 1.69 1998/07/30 23:04:46 jah Exp $ */ #include <stdlib.h> --- 28,34 ---- +----------------------------------------------------------------------+ */ ! /* $Id: pgsql.c,v 1.70 1998/09/10 23:57:20 zeev Exp $ */ #include <stdlib.h> *************** *** 854,860 **** void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS) { ! pval *result, *row, *yystype_ptr; PGresult *pgsql_result; int type; int i,num_fields; --- 854,860 ---- void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS) { ! pval *result, *row, *pval_ptr; PGresult *pgsql_result; int type; int i,num_fields; *************** *** 888,902 **** if (php3_ini.magic_quotes_runtime) { char *tmp=_php3_addslashes(element,element_len,&element_len,0); ! add_get_index_stringl(return_value, i, tmp, element_len, (void **) &yystype_ptr, 0); } else { ! add_get_index_stringl(return_value, i, element, element_len, (void **) &yystype_ptr, 1); } field_name = PQfname(pgsql_result,i); ! _php3_hash_pointer_update(return_value->value.ht, field_name, strlen(field_name)+1, yystype_ptr); } else { /* NULL field, don't set it */ ! /* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &yystype_ptr); */ } } } --- 888,902 ---- if (php3_ini.magic_quotes_runtime) { char *tmp=_php3_addslashes(element,element_len,&element_len,0); ! add_get_index_stringl(return_value, i, tmp, element_len, (void **) &pval_ptr, 0); } else { ! add_get_index_stringl(return_value, i, element, element_len, (void **) &pval_ptr, 1); } field_name = PQfname(pgsql_result,i); ! _php3_hash_pointer_update(return_value->value.ht, field_name, strlen(field_name)+1, pval_ptr); } else { /* NULL field, don't set it */ ! /* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr); */ } } } Index: php3/functions/post.c diff -c php3/functions/post.c:1.108 php3/functions/post.c:1.109 *** php3/functions/post.c:1.108 Sat Aug 8 05:40:31 1998 --- php3/functions/post.c Thu Sep 10 19:57:21 1998 *************** *** 207,213 **** } } else { if (arr_ptr->type!=IS_ARRAY) { ! yystype_destructor(arr_ptr _INLINE_TLS); if (array_init(arr_ptr)==FAILURE) { return; } --- 207,213 ---- } } else { if (arr_ptr->type!=IS_ARRAY) { ! pval_destructor(arr_ptr _INLINE_TLS); if (array_init(arr_ptr)==FAILURE) { return; } *************** *** 238,250 **** if (php3_check_type(ret) == IS_LONG) { _php3_hash_index_update(arr1.value.ht, atol(ret), &entry, sizeof(pval),NULL); /* s[ret]=tmp */ if (track_vars_array) { ! yystype_copy_constructor(&entry); _php3_hash_index_update(arr2.value.ht, atol(ret), &entry, sizeof(pval),NULL); } } else { _php3_hash_update(arr1.value.ht, ret, strlen(ret)+1, &entry, sizeof(pval),NULL); /* s["ret"]=tmp */ if (track_vars_array) { ! yystype_copy_constructor(&entry); _php3_hash_update(arr2.value.ht, ret, strlen(ret)+1, &entry, sizeof(pval),NULL); } } --- 238,250 ---- if (php3_check_type(ret) == IS_LONG) { _php3_hash_index_update(arr1.value.ht, atol(ret), &entry, sizeof(pval),NULL); /* s[ret]=tmp */ if (track_vars_array) { ! pval_copy_constructor(&entry); _php3_hash_index_update(arr2.value.ht, atol(ret), &entry, sizeof(pval),NULL); } } else { _php3_hash_update(arr1.value.ht, ret, strlen(ret)+1, &entry, sizeof(pval),NULL); /* s["ret"]=tmp */ if (track_vars_array) { ! pval_copy_constructor(&entry); _php3_hash_update(arr2.value.ht, ret, strlen(ret)+1, &entry, sizeof(pval),NULL); } } *************** *** 253,259 **** } else { /* non-indexed array */ _php3_hash_next_index_insert(arr1.value.ht, &entry, sizeof(pval),NULL); if (track_vars_array) { ! yystype_copy_constructor(&entry); _php3_hash_next_index_insert(arr2.value.ht, &entry, sizeof(pval),NULL); } } --- 253,259 ---- } else { /* non-indexed array */ _php3_hash_next_index_insert(arr1.value.ht, &entry, sizeof(pval),NULL); if (track_vars_array) { ! pval_copy_constructor(&entry); _php3_hash_next_index_insert(arr2.value.ht, &entry, sizeof(pval),NULL); } } *************** *** 269,275 **** entry.type = IS_STRING; _php3_hash_update(GLOBAL(active_symbol_table), var, var_len+1, (void *) &entry, sizeof(pval),NULL); if (track_vars_array) { ! yystype_copy_constructor(&entry); _php3_hash_update(track_vars_array->value.ht, var, var_len+1, (void *) &entry, sizeof(pval),NULL); } } --- 269,275 ---- entry.type = IS_STRING; _php3_hash_update(GLOBAL(active_symbol_table), var, var_len+1, (void *) &entry, sizeof(pval),NULL); if (track_vars_array) { ! pval_copy_constructor(&entry); _php3_hash_update(track_vars_array->value.ht, var, var_len+1, (void *) &entry, sizeof(pval),NULL); } } Index: php3/functions/reg.c diff -c php3/functions/reg.c:1.85 php3/functions/reg.c:1.86 *** php3/functions/reg.c:1.85 Fri Sep 4 11:18:12 1998 --- php3/functions/reg.c Thu Sep 10 19:57:21 1998 *************** *** 28,34 **** | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ ! /* $Id: reg.c,v 1.85 1998/09/04 15:18:12 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 28,34 ---- | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ ! /* $Id: reg.c,v 1.86 1998/09/10 23:57:21 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 179,185 **** RETURN_FALSE; } ! yystype_destructor(array _INLINE_TLS); /* start with clean array */ array_init(array); for (i = 0; i < NS; i++) { --- 179,185 ---- RETURN_FALSE; } ! pval_destructor(array _INLINE_TLS); /* start with clean array */ array_init(array); for (i = 0; i < NS; i++) { Index: php3/functions/string.c diff -c php3/functions/string.c:1.138 php3/functions/string.c:1.139 *** php3/functions/string.c:1.138 Thu Sep 10 18:19:53 1998 --- php3/functions/string.c Thu Sep 10 19:57:22 1998 *************** *** 30,36 **** */ ! /* $Id: string.c,v 1.138 1998/09/10 22:19:53 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 30,36 ---- */ ! /* $Id: string.c,v 1.139 1998/09/10 23:57:22 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 819,825 **** } *return_value = *str; ! yystype_copy_constructor(return_value); } --- 819,825 ---- } *return_value = *str; ! pval_copy_constructor(return_value); } Index: php3/functions/sybase-ct.c diff -c php3/functions/sybase-ct.c:1.43 php3/functions/sybase-ct.c:1.44 *** php3/functions/sybase-ct.c:1.43 Mon Jun 22 16:28:37 1998 --- php3/functions/sybase-ct.c Thu Sep 10 19:57:22 1998 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: sybase-ct.c,v 1.43 1998/06/22 20:28:37 zeev Exp $ */ #ifndef MSVC5 --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: sybase-ct.c,v 1.44 1998/09/10 23:57:22 zeev Exp $ */ #ifndef MSVC5 *************** *** 117,123 **** if (result->data) { for (i=0; i<result->num_rows; i++) { for (j=0; j<result->num_fields; j++) { ! yystype_destructor(&result->data[i][j]); } efree(result->data[i]); } --- 117,123 ---- if (result->data) { for (i=0; i<result->num_rows; i++) { for (j=0; j<result->num_fields; j++) { ! pval_destructor(&result->data[i][j]); } efree(result->data[i]); } *************** *** 976,982 **** array_init(return_value); for (i=0; i<result->num_fields; i++) { field_content = result->data[result->cur_row][i]; ! yystype_copy_constructor(&field_content); _php3_hash_index_update(return_value->value.ht, i, (void *) &field_content, sizeof(pval),NULL); } result->cur_row++; --- 976,982 ---- array_init(return_value); for (i=0; i<result->num_fields; i++) { field_content = result->data[result->cur_row][i]; ! pval_copy_constructor(&field_content); _php3_hash_index_update(return_value->value.ht, i, (void *) &field_content, sizeof(pval),NULL); } result->cur_row++; *************** *** 989,995 **** sybct_result *result; int type; int i; ! pval *yystype_ptr,tmp; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybct_result_index)==FAILURE) { WRONG_PARAM_COUNT; --- 989,995 ---- sybct_result *result; int type; int i; ! pval *pval_ptr,tmp; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybct_result_index)==FAILURE) { WRONG_PARAM_COUNT; *************** *** 1013,1024 **** for (i=0; i<result->num_fields; i++) { tmp = result->data[result->cur_row][i]; ! yystype_copy_constructor(&tmp); if (php3_ini.magic_quotes_runtime && tmp.type == IS_STRING) { tmp.value.str.val = _php3_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1); } ! _php3_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(pval), (void **) &yystype_ptr); ! _php3_hash_pointer_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, yystype_ptr); } result->cur_row++; } --- 1013,1024 ---- for (i=0; i<result->num_fields; i++) { tmp = result->data[result->cur_row][i]; ! pval_copy_constructor(&tmp); if (php3_ini.magic_quotes_runtime && tmp.type == IS_STRING) { tmp.value.str.val = _php3_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1); } ! _php3_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(pval), (void **) &pval_ptr); ! _php3_hash_pointer_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, pval_ptr); } result->cur_row++; } *************** *** 1254,1260 **** } *return_value = result->data[row->value.lval][field_offset]; ! yystype_copy_constructor(return_value); } --- 1254,1260 ---- } *return_value = result->data[row->value.lval][field_offset]; ! pval_copy_constructor(return_value); } Index: php3/functions/sybase.c diff -c php3/functions/sybase.c:1.105 php3/functions/sybase.c:1.106 *** php3/functions/sybase.c:1.105 Thu Aug 13 16:31:20 1998 --- php3/functions/sybase.c Thu Sep 10 19:57:23 1998 *************** *** 31,37 **** +----------------------------------------------------------------------+ */ ! /* $Id: sybase.c,v 1.105 1998/08/13 20:31:20 zeev Exp $ */ #ifndef MSVC5 --- 31,37 ---- +----------------------------------------------------------------------+ */ ! /* $Id: sybase.c,v 1.106 1998/09/10 23:57:23 zeev Exp $ */ #ifndef MSVC5 *************** *** 154,160 **** if (result->data) { for (i=0; i<result->num_rows; i++) { for (j=0; j<result->num_fields; j++) { ! yystype_destructor(&result->data[i][j]); } efree(result->data[i]); } --- 154,160 ---- if (result->data) { for (i=0; i<result->num_rows; i++) { for (j=0; j<result->num_fields; j++) { ! pval_destructor(&result->data[i][j]); } efree(result->data[i]); } *************** *** 918,924 **** array_init(return_value); for (i=0; i<result->num_fields; i++) { field_content = result->data[result->cur_row][i]; ! yystype_copy_constructor(&field_content); _php3_hash_index_update(return_value->value.ht, i, (void *) &field_content, sizeof(pval),NULL); } result->cur_row++; --- 918,924 ---- array_init(return_value); for (i=0; i<result->num_fields; i++) { field_content = result->data[result->cur_row][i]; ! pval_copy_constructor(&field_content); _php3_hash_index_update(return_value->value.ht, i, (void *) &field_content, sizeof(pval),NULL); } result->cur_row++; *************** *** 931,937 **** sybase_result *result; int type; int i; ! pval *yystype_ptr,tmp; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) { WRONG_PARAM_COUNT; --- 931,937 ---- sybase_result *result; int type; int i; ! pval *pval_ptr,tmp; if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &sybase_result_index)==FAILURE) { WRONG_PARAM_COUNT; *************** *** 955,966 **** for (i=0; i<result->num_fields; i++) { tmp = result->data[result->cur_row][i]; ! yystype_copy_constructor(&tmp); if (php3_ini.magic_quotes_runtime && tmp.type == IS_STRING) { tmp.value.str.val = _php3_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1); } ! _php3_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(pval), (void **) &yystype_ptr); ! _php3_hash_pointer_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, yystype_ptr); } result->cur_row++; } --- 955,966 ---- for (i=0; i<result->num_fields; i++) { tmp = result->data[result->cur_row][i]; ! pval_copy_constructor(&tmp); if (php3_ini.magic_quotes_runtime && tmp.type == IS_STRING) { tmp.value.str.val = _php3_addslashes(tmp.value.str.val,tmp.value.str.len,&tmp.value.str.len,1); } ! _php3_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(pval), (void **) &pval_ptr); ! _php3_hash_pointer_update(return_value->value.ht, result->fields[i].name, strlen(result->fields[i].name)+1, pval_ptr); } result->cur_row++; } *************** *** 1198,1204 **** } *return_value = result->data[row->value.lval][field_offset]; ! yystype_copy_constructor(return_value); } --- 1198,1204 ---- } *return_value = result->data[row->value.lval][field_offset]; ! pval_copy_constructor(return_value); } Index: php3/functions/unified_odbc.c diff -c php3/functions/unified_odbc.c:1.77 php3/functions/unified_odbc.c:1.78 *** php3/functions/unified_odbc.c:1.77 Sun Sep 6 09:18:54 1998 --- php3/functions/unified_odbc.c Thu Sep 10 19:57:23 1998 *************** *** 704,710 **** RETURN_FALSE; } ! yystype_copy_constructor(arg2); _php3_hash_internal_pointer_reset(arr.value.ht); params = (params_t *)emalloc(sizeof(params_t) * result->numparams); --- 704,710 ---- RETURN_FALSE; } ! pval_copy_constructor(arg2); _php3_hash_internal_pointer_reset(arr.value.ht); params = (params_t *)emalloc(sizeof(params_t) * result->numparams); -- 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 (#950) next »