Re: Re: cvs: php4 /ext/interbase interbase.c
| From: | Daniela Mariaschi | Date: | Thu, 21 Mar 2002 11:34:14 +0000 |
| Subject: | Re: Re: cvs: php4 /ext/interbase interbase.c | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-81595@lists.php.net to get a copy of this message | ||
> On Tue, 19 Mar 2002, Ludovico Magnocavallo wrote:
> > Derick Daniela patch allows tests 3-6 in ext/interbase/tests to pass
> Ah okay. Can you also make sure the patches go into yhe PHP_4_2_0 branch
> so that they are available in the new PHP CVS release?
>
> Derick
Hello Derick, sorry for my delay ...........
ok...., I will commit that fix on rendering numeric/decimal number on the
PHP_4_2_0 branch
in the afternoon as soon as possible .......
I would like to ask you if I have also to commit in PHP_4_2_0 the new
function
ibase_fetch_assoc I committed last week or if it's better according to
you to postpon it.
Daniela
>
> > <derick@php.net> wrote in message
>
> >
> > news:Pine.LNX.4.44.0203191645540.5229-100000@jdi.jdimedia.nl...
> > > 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] giancarlo@niccolai.ws
> > > 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
> > giancarlo@niccolai.ws 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)));
> > > >
> > > >