On 18/03/02, "Zeev Suraski" <[EMAIL PROTECTED]> wrote: > Ok, so basically you're saying that you're doing much more relaying than > the standard one-level relaying?
Yes :-) > Ok, that makes sense (are you sure you'd > want the get the outermost level, though? from my experience you'd usually > want just the closest layer, but things may be different with the streams). I suppose it's down to personal preference; my goal was to find out where the stream was opened, and since allocations in streams typically only occur when opening, it should be quite simple to follow the execution path to find the closest layer, if needed. This has the nice advantage of telling the programmer when they have forgotten to close the streams, or assign them to resources. (that part is worth discussing; I'll send another email about that). > At any rate, if you do want this multilevel relaying, I think you can > achieve it with only changing the _REL macro, and without having to change > the others: > > 1. Put __php_stream_call_depth inside the stream globals (I think you > don't have a stream globals structure, so you can put them in the PHP core > globals). > 2. Increment/decrement it inside each of the functions you are tracking > 3. Use TSRM macros for everything, except for the _REL macros OK; I'll try and do this sometime today. Is it possible to define the TSRMLS_D macro to something that the compiler can catch in a debug build under non-TSRM conditions? --Wez. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php