At 07:06 PM 11/21/2002 +0100, Sander Roobol wrote:
Hey,

Attached is a patch that makes the bcmath extension thread safe.
Very cool! Thanks a lot.


I'm new to all that TSRM stuff, but I think this should do it. I
replaced the old globals with TSRM globals (inspired by the CG() and the
ext/crack implementation), and wrapped, as you proposed, all references
to _zero_, _one_ and _two_ in a BCG() macro, that does basically the
same as the CG() macro. Furthermore, I added TSRMLS_* macros to all bc_*
functions that need it. You were talking about a new BC_ARGS macro, but
I don't see any reason not to use the TSRMLS macros. Correct me if I'm
wrong.
When I mentioned the BC_ARGS macro I was thinking of another way but the way you did it is just as good.

It now compiles and runs fine (passes all tests) both with and without
ZTS. I can't test it in a multithreaded environment, so I'm asking you
to look over the patch.

If everything's ok, I'll commit this patch to CVS HEAD and the 4.3
branch.
Yep, go ahead.

This was the last thing that bugged me personally for 4.3.
Andi


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to