Timm Friebe wrote:
Or, replying to myself, simply use convert_scalar_to_number() from
Zend/zend_operators.c which (AFAIS) does pretty much the same. The
testcase I wrote for this (attached) is passed here.
I think that should do the trick ...
Ard, do you use sybase_ct? If so, could you verify it wo
On Sun, 2004-05-16 at 18:16, Timm Friebe wrote:
> [...]
> Or, replying to myself, simply use convert_scalar_to_number() from
> Zend/zend_operators.c which (AFAIS) does pretty much the same. The
> testcase I wrote for this (attached) is passed here.
>
> Ard, do you use sybase_ct? If so, could you v
On Sun, 2004-05-16 at 17:57, Timm Friebe wrote:
> On Sun, 2004-05-16 at 17:17, Ard Biesheuvel wrote:
[...]
> -- snip --
> Z_STRLEN(result->data[i][j]) = result->lengths[j]-1;
> Z_STRVAL(result->data[i][j]) = estrndup(result->tmp_buffer[j],
> result->lengths[j]);
> Z_TYPE(result->data[i][j]) = IS_ST
On Sun, 2004-05-16 at 17:17, Ard Biesheuvel wrote:
> Hi Timm,
>
> I have an old Alpha PWS433 running FreeBSD which I use for this kind of
> stuff.
>
> > If so, what does this print?
> > --
> > #define LONG_MAX 2147483647L
>
Hi Timm,
I have an old Alpha PWS433 running FreeBSD which I use for this kind of
stuff.
If so, what does this print?
--
#define LONG_MAX 2147483647L
#define LONG_MIN (- LONG_MAX - 1)
Use this for portability
#define LONG_MIN
On Sat, 2004-05-15 at 20:11, Ard Biesheuvel wrote:
[...LONG_MIN / LONG_MAX comparison]
> Hi Timm,
>
> I think this code is broken on 64-bit archs, as doubles lack the
> precision to accurately represent a 64-bit long. Also, comparing double
> values with LONG_[MIN|MAX] is dangerous for the same
Timm Friebe wrote:
+ case 3:
+ /* This signals we have an integer datatype, but we need to convert to double if we
+ * overflow.
*/
convert_to_double(&result->data[i][j]);
+ if (Z_DVAL(result->data[i][j]) >= LONG_MIN && Z_DVAL(result->data[i][j]) <= LONG_MAX) {
On Fri, 2004-05-14 at 17:34, Alex Kiesel wrote:
> Hi Internals, hi Timm,
[...]
> This patch (committed with rev. 1.89 in ext/sybase_ct/php_sybase_ct.c)
> introduces a behaviour I consider broken:
>
> # select 2147483647
> becomes an int because Sybase automatically converts the input into
> an
Hi Internals, hi Timm,
On Sat, 2004-01-24 at 03:17, Timm Friebe wrote:
> @- Fixed bug #22403 "PHP crashes when executing a sql procedure without
> @ parameters" (Timm)
> @- Fixed memory leak in sybase_set_message_handler() (Timm)
> # Fixed bug with large numerics correctly (initial fix i