Derick Daniela patch allows tests 3-6 in ext/interbase/tests to pass, while before this patch tests 3 6 failed.
BTW, I wonder if people uses tests before committing, as Interbase tests appear never to have been run, table definitions in tests 3/6 have a coulm of type DATE that cannot accept the datetime values the tests try to insert. The correct type for Interbase should be TIMESTAMP. =) I am fixing the tests, I will commit the patches as soon as I get karma on php4, otherwise I will ask Daniela to commit them. L. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hello Daniela, > > I thought that I fixed it already: > > http://news.php.net/article.php?group=php.cvs&article=9742 > > And you reverted now this note (from the same bug): > > [6 Mar 6:21am] [EMAIL PROTECTED] > Hi; I am the original fixer... > Noticed that > > for (i = 0; i < -scale; i++) > number /= 10; > > can be substituted with > > number /= - 10 * scale; > > with a boost on performance. (remember that interbase > stores the "scale" as a negative number). > > > can you have a look at it? > > > Derick > > > On Tue, 19 Mar 2002, Daniela Mariaschi wrote: > > > daniela Tue Mar 19 10:29:18 2002 EDT > > > > Modified files: > > /php4/ext/interbase interbase.c > > Log: > > fixed floating number incorrectly rendered (as mentioned by [EMAIL PROTECTED] in BUG #14755) > > > > Index: php4/ext/interbase/interbase.c > > diff -u php4/ext/interbase/interbase.c:1.80 php4/ext/interbase/interbase.c:1.81 > > --- php4/ext/interbase/interbase.c:1.80 Sat Mar 16 13:43:41 2002 > > +++ php4/ext/interbase/interbase.c Tue Mar 19 10:29:17 2002 > > @@ -17,7 +17,7 @@ > > +----------------------------------------------------------------------+ > > */ > > > > -/* $Id: interbase.c,v 1.80 2002/03/16 18:43:41 wez Exp $ */ > > +/* $Id: interbase.c,v 1.81 2002/03/19 15:29:17 daniela Exp $ */ > > > > > > /* TODO: Arrays, roles? > > @@ -595,7 +595,7 @@ > > > > php_info_print_table_start(); > > php_info_print_table_row(2, "Interbase Support", "enabled"); > > - php_info_print_table_row(2, "Revision", "$Revision: 1.80 $"); > > + php_info_print_table_row(2, "Revision", "$Revision: 1.81 $"); > > #ifdef COMPILE_DL_INTERBASE > > php_info_print_table_row(2, "Dynamic Module", "yes"); > > #endif > > @@ -1787,13 +1787,14 @@ > > val->type = IS_STRING; > > > > if (scale) { > > - int i, len; > > - char dt[20]; > > + int j, f = 1; > > double number = (double) ((ISC_INT64) (*((ISC_INT64 *)data))); > > - > > - number /= - 10 * scale; > > + char dt[20]; > > + for (j = 0; j < -scale; j++) { > > + f *= 10; > > + } > > sprintf(dt, "%%0.%df", -scale); > > - val->value.str.len = sprintf (string_data, dt, number); > > + val->value.str.len = sprintf (string_data, dt, number/f ); > > } else { > > val->value.str.len = sprintf (string_data, "%Ld", > > (ISC_INT64) (*((ISC_INT64 *)data))); > > > > > > > > -- > > PHP CVS Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > ----------------------------------------------------------------------- > PHP: Scripting the Web - [EMAIL PROTECTED] > All your branches are belong to me! > SRM: Script Running Machine - www.vl-srm.net > ----------------------------------------------------------------------- > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php