Something wrong with CVS commit?

php.internals

Andi Gutmans

21 years ago
I just commited a big patch to Zend and the commit message didn't come through. Any idea why? revision 1.1 date: 2004/09/08 22:14:12; author: andi; state: Exp; - Some architectural changes: a) We specialize opcodes according to op_type fields. Each opcode has to be marked with which op_type's it uses. b) We support different execution methods. Function handlers, switch() and goto dispatching. goto seems to be the fastest but it really depends on the compiler and how well it optimizes. I suggest playing around with optimization flags. - Warning: Things might break so keep us posted on how things are going. (Dmitry, Andi) Andi

Rasmus Lerdorf

21 years ago
I saw it. On Wed, 8 Sep 2004, Andi Gutmans wrote:

Andi Gutmans

21 years ago
Never mind. It just seems to have arrived. At 03:37 PM 9/8/2004 -0700, Andi Gutmans wrote:

Frédéric LECOINTRE

21 years ago
hi all, 1) i have to implement __set and __get methods in internal class but, actually, methods declared in the class function entry aren't recognized automatically like __construct, __destruct and __clone. i can see that in zend_register_functions ( zend_API.c # from l. 1308) to solve this problem, i do this when register the class : _______ if ( zend_hash_find( &myobject_ce->function_table, ZEND_SET_FUNC_NAME , strlen(ZEND_SET_FUNC_NAME) +1 , (void **) &f_set)==SUCCESS) myobject_ce->__set = f_set; _______ it work fine now ( with sub class, overloading, ... ) but i think, perhaps, it would be a good idea to make that automaically like the others ? 2 ) Another question, i try to use the zend_try ... macro but i have this error when i compile it with visual c++ (w2k). error LNK2001: unresolved external symbol _executor_globals_id error come from EG(***) but i can't find solution ! any help ? 3 ) for the Zend people, is engine-api-doc@lists.zend.com still active ? i want to register but no response ... regards Frédéric LECOINTRE

Marcus Börger

21 years ago
Hello Frédéric, first of all never rply to another topic with a new one that confuses our mail clients. Thursday, September 9, 2004, 2:05:11 AM, you wrote:
> hi all,
> 1)
> i have to implement __set and __get methods in internal class but, actually, > methods declared in the class function entry aren't recognized > automatically like __construct, __destruct and __clone.
> i can see that in zend_register_functions ( zend_API.c # from l. 1308)
> to solve this problem, i do this when register the class : > _______
> if ( zend_hash_find( &myobject_ce->function_table, ZEND_SET_FUNC_NAME , > strlen(ZEND_SET_FUNC_NAME) +1 , (void **) &f_set)==SUCCESS) > myobject_ce->__set = f_set;
don't do "strlen(ZEND_SET_FUNC_NAME) +1" bt instead do "sizeof(ZEND_SET_FUNC_NAME)"
> _______
> it work fine now ( with sub class, overloading, ... ) but i think, perhaps, > it would be a good idea to make that automaically like the others ?
yep, i'll lokk into it. The functions does more things wrong.
> 2 ) > Another question, i try to use the zend_try ... macro but i have this error > when i compile it with visual c++ (w2k).
> error LNK2001: unresolved external symbol _executor_globals_id
> error come from EG(***) but i can't find solution ! any help ?
do not use that macro it's for the engine itself only.
> 3 )
> for the Zend people, is engine-api-doc@lists.zend.com still active ? > i want to register but no response ...
> regards
> Frédéric LECOINTRE
-- Best regards, Marcus mailto:helly@php.net

Frédéric LECOINTRE

21 years ago
hi Marcus, Sorry for the post ! well, with zend_try, i want to catch an exception (throwed in user space or internal). if I can't use it , how I can recover exception ? thanks fred ----- Original Message ----- From: "Marcus Boerger" <helly@php.net> To: "Frédéric LECOINTRE" <frederic.lecointre@burnweb.net> Cc: <internals@lists.php.net> Sent: Thursday, September 09, 2004 10:43 AM Subject: Re: [PHP-DEV] __set __get __call in internal class
> Hello Frédéric, > > first of all never rply to another topic with a new one that confuses > our mail clients. > > Thursday, September 9, 2004, 2:05:11 AM, you wrote: > > > hi all, > > > 1) > > > i have to implement __set and __get methods in internal class but,
actually,
> > methods declared in the class function entry aren't recognized > > automatically like __construct, __destruct and __clone. > > > i can see that in zend_register_functions ( zend_API.c # from l. 1308) > > > to solve this problem, i do this when register the class : > > _______ > > > if ( zend_hash_find( &myobject_ce->function_table, ZEND_SET_FUNC_NAME
,
> > strlen(ZEND_SET_FUNC_NAME) +1 , (void **) &f_set)==SUCCESS) > > myobject_ce->__set = f_set; > > don't do "strlen(ZEND_SET_FUNC_NAME) +1" bt instead do
"sizeof(ZEND_SET_FUNC_NAME)"
> > _______ > > > it work fine now ( with sub class, overloading, ... ) but i think,
perhaps,
> > it would be a good idea to make that automaically like the others ? > > yep, i'll lokk into it. The functions does more things wrong. > > > 2 ) > > Another question, i try to use the zend_try ... macro but i have this
error

Marcus Börger

21 years ago
Hello Frédéric, Friday, September 10, 2004, 1:28:31 PM, you wrote:
> hi Marcus, > Sorry for the post !
> well, with zend_try, i want to catch an exception (throwed in user space or > internal). > if I can't use it , how I can recover exception ?
that has nothing in common. the macros are try/catch blocks for c code. the php (user space) exceptions are handled by the engine and are stored in EG(exception), however you won't be able to handle them. The only thing you can do is that if your c code calls another function ir even user space function that throws a php exception than EG(exception) is set afterwards and in most cases your code (the part after the call) should still be executed. regards marcus

Frédéric LECOINTRE

21 years ago
hello Marcus, well, i knew for zend_try but i hoped that they could do something for user exception. ( i saw a piece of code in soap.c) unfortunately, my problem is the same: catch user exception or at least, know if an exception is thrown. I read zend_exception.c line by line ( word by word :) ), and I wonder whether it is possible to do something with zend_throw_exception_hook ? ( but I don't think ...) another way, it's to add a function in zend_exception.c that return 0/1 if there's an exception... if I can dream ... a copy but i don't know if that has an impact on the engine. ( note that ZEND_API void zend_clear_exception(TSRMLS_D): exist !! ) regards fred ----- Original Message ----- From: "Marcus Boerger" <helly@php.net> To: "Frédéric LECOINTRE" <frederic.lecointre@burnweb.net> Cc: <internals@lists.php.net> Sent: Friday, September 10, 2004 11:35 PM Subject: Re: [PHP-DEV] __set __get __call in internal class
> Hello Frédéric, > > Friday, September 10, 2004, 1:28:31 PM, you wrote: > > > hi Marcus, > > Sorry for the post ! > > > well, with zend_try, i want to catch an exception (throwed in user space
or

Marcus Börger

21 years ago
Hello Frédéric, Saturday, September 11, 2004, 9:26:45 PM, you wrote:
> hello Marcus,
> ... i saw a piece of code in soap.c
that extension is not the best place to look at, for it's nature it needs to do very strange things
> another way, it's to add a function in zend_exception.c that return 0/1 if > there's an exception... if I can dream ... a copy but i don't know if that > has an impact on the engine. ( note that ZEND_API void > zend_clear_exception(TSRMLS_D): exist !! )
as i told you, now here as a code example: #define ZEND_ACTIVE_EXCEPTION() (EG(exception) != NULL)
> regards
> fred
> ----- Original Message ----- > From: "Marcus Boerger" <helly@php.net> > To: "Frédéric LECOINTRE" <frederic.lecointre@burnweb.net> > Cc: <internals@lists.php.net> > Sent: Friday, September 10, 2004 11:35 PM > Subject: Re: [PHP-DEV] __set __get __call in internal class
>> Hello Frédéric, >> >> Friday, September 10, 2004, 1:28:31 PM, you wrote: >> >> > hi Marcus, >> > Sorry for the post ! >> >> > well, with zend_try, i want to catch an exception (throwed in user space > or >> > internal). >> > if I can't use it , how I can recover exception ? >> >> that has nothing in common. the macros are try/catch blocks for c code. >> the php (user space) exceptions are handled by the engine and are stored >> in EG(exception), however you won't be able to handle them. The only >> thing you can do is that if your c code calls another function ir even >> user space function that throws a php exception than EG(exception) is >> set afterwards and in most cases your code (the part after the call) >> should still be executed. >> >> regards >> marcus >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >>
-- Best regards, Marcus mailto:helly@php.net