Re: [PHP-DEV] Re: ZendEngine2 / zend_ini_parser.y zend_ini_scanner.l

2004-05-16 Thread Zeev Suraski
At 09:11 16/05/2004, Andi Gutmans wrote: At 01:10 PM 5/15/2004 -0700, Sara Golemon wrote: A) Isn't it late in the RC cycle to be adding features? Although personally I don't think this patch is very important/useful, it's quite self-contained so we thought it'd wouldn't be a big deal to add it. It

[PHP-DEV] CVS Account Request: klaus

2004-05-16 Thread Klaus Roberto de Paiva
Translating the documentation. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: ZendEngine2 / zend_ini_parser.y zend_ini_scanner.l

2004-05-16 Thread Andi Gutmans
Yeah I think Zeev is probably right, especially as I don't think we need more than one more RC before we release. Andrei, do you mind if we revisit this after 5.0? Andi At 12:00 PM 5/16/2004 +0300, Zeev Suraski wrote: At 09:11 16/05/2004, Andi Gutmans wrote: At 01:10 PM 5/15/2004 -0700, Sara Gole

[PHP-DEV] Filename of the currently executed php script

2004-05-16 Thread Stefan Mueller
Hi I'm a greenhorn tying to add some code to /ext/standard/mail.c php_mail(...), but I have trouble to get the filename of the php script that triggers the php_mail(...) call. compiler_globals.compiled_filename doesn't work. It's always NULL. Any ideas how i could get this filename? thanks !

RE: [PHP-DEV] Filename of the currently executed php script

2004-05-16 Thread Wez Furlong
>From zend_error(): error_filename = zend_get_executed_filename(TSRMLS_C); error_lineno = zend_get_executed_lineno(TSRMLS_C); --Wez. > -Original Message- > From: Stefan Mueller [mailto:[EMAIL PROTECTED] > Sent: 16 May 2004 15:22 > To: [EMAIL PROTECTED] > Subject: [PHP-DEV] Filename

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
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

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Ard Biesheuvel
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

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
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 >

Re: [PHP-DEV] Extension written in C++ and undefined symbols

2004-05-16 Thread Vladimir Zidar
When you need to access function compiled from C++ source code, you need to declare it as extern "C", in order to tell the compiler to generate function name that is compatible with C. Otherwise, compiler will generate different name (will mangle it), and C won't be able to find it. So, write e

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
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

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
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

Re: [PHP-DEV] Extension written in C++ and undefined symbols

2004-05-16 Thread Peter Waller
Thank you muchly. It took considerable trial and error but I got it working. For any poor person that ends up searching this list and comes up to this thread, in the config.m4 file add the lines PHP_REQUIRE_CXX EXTRA_LDFLAGS=-lstdc++ Somewhere. Also make sure that your file ends in the extensio

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Ard Biesheuvel
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

[PHP-DEV] type hints and default values

2004-05-16 Thread Ard Biesheuvel
Hi, As default values for type-hinted parameters are now pointless, should we still allow them ? -- Ard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] LONG_MIN

2004-05-16 Thread Timm Friebe
Hello, are we off one here? $ php-dev -r 'var_dump(-2147483648);' float(-2147483648) $ php-dev -r 'var_dump(-2147483647 -1);' int(-2147483648) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: LONG_MIN

2004-05-16 Thread Ard Biesheuvel
Timm Friebe wrote: Hello, are we off one here? $ php-dev -r 'var_dump(-2147483648);' float(-2147483648) $ php-dev -r 'var_dump(-2147483647 -1);' int(-2147483648) No, this is caused by the way the parser works. The unary minus is parsed separately from the number. I've reported this to Andi a while

[PHP-DEV] Re: Extension written in C++ and undefined symbols

2004-05-16 Thread Asgeir Frimannsson
Peter 'Iridium' Waller wrote: > I've currently got some libraries written in C++ with various class > interfaces, I was going to write an interface between them and PHP but > got very stuck trying to get the extension to recognize any C++ linked > to it at all.. Not an answer to your question (sin

Re: [PHP-DEV] Re: ZendEngine2 / zend_ini_parser.y zend_ini_scanner.l

2004-05-16 Thread Sara Golemon
> > A) Isn't it late in the RC cycle to be adding features? > > I guess not. I got OK from Andi & Zeev. > I realized after sending that it sounded a bit hostile. I apologize for that, but I was under the impression that we're into critical-only territory at this point, and this feature is hardly c

[PHP-DEV] Advanced OO Topic

2004-05-16 Thread Robert Peake
Hi, I notice a strange behavior in PHP4 and wonder if anyone can explain it. Essentially, when I extend a class from a built-in module, I can add and access variables but can not access new functions I create within the extended class. This has only happened attempting to extend classes from mi