Made bcmath extension thread safe.

@Made bcmath extension thread safe. (Sander)
This commit is contained in:
Sander Roobol 2002-11-22 09:25:29 +00:00
parent 64a75d6d77
commit f200f739d8
14 changed files with 186 additions and 202 deletions

View file

@ -41,10 +41,7 @@
/* Convert strings to bc numbers. Base 10 only.*/
void
bc_str2num (num, str, scale)
bc_num *num;
char *str;
int scale;
bc_str2num (bc_num *num, char *str, int scale TSRMLS_DC)
{
int digits, strscale;
char *ptr, *nptr;
@ -65,7 +62,7 @@ bc_str2num (num, str, scale)
while (isdigit((int)*ptr)) ptr++, strscale++; /* digits */
if ((*ptr != '\0') || (digits+strscale == 0))
{
*num = bc_copy_num (_zero_);
*num = bc_copy_num (BCG(_zero_));
return;
}