Commit c679569f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Always destroy _Lockit object in use_facet function.

parent 363d39e1
...@@ -1537,8 +1537,10 @@ ctype_char* ctype_char_use_facet(const locale *loc) ...@@ -1537,8 +1537,10 @@ ctype_char* ctype_char_use_facet(const locale *loc)
return (ctype_char*)fac; return (ctype_char*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
ctype_char__Getcat(&fac, loc); ctype_char__Getcat(&fac, loc);
obj = (ctype_char*)fac; obj = (ctype_char*)fac;
...@@ -2292,8 +2294,10 @@ ctype_wchar* ctype_wchar_use_facet(const locale *loc) ...@@ -2292,8 +2294,10 @@ ctype_wchar* ctype_wchar_use_facet(const locale *loc)
return (ctype_wchar*)fac; return (ctype_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
ctype_wchar__Getcat(&fac, loc); ctype_wchar__Getcat(&fac, loc);
obj = (ctype_wchar*)fac; obj = (ctype_wchar*)fac;
...@@ -2318,8 +2322,10 @@ static ctype_wchar* ctype_short_use_facet(const locale *loc) ...@@ -2318,8 +2322,10 @@ static ctype_wchar* ctype_short_use_facet(const locale *loc)
return (ctype_wchar*)fac; return (ctype_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
ctype_short__Getcat(&fac, loc); ctype_short__Getcat(&fac, loc);
obj = (ctype_wchar*)fac; obj = (ctype_wchar*)fac;
...@@ -2783,8 +2789,10 @@ codecvt_char* codecvt_char_use_facet(const locale *loc) ...@@ -2783,8 +2789,10 @@ codecvt_char* codecvt_char_use_facet(const locale *loc)
return (codecvt_char*)fac; return (codecvt_char*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
codecvt_char__Getcat(&fac, loc); codecvt_char__Getcat(&fac, loc);
obj = (codecvt_char*)fac; obj = (codecvt_char*)fac;
...@@ -3086,8 +3094,10 @@ static codecvt_wchar* codecvt_wchar_use_facet(const locale *loc) ...@@ -3086,8 +3094,10 @@ static codecvt_wchar* codecvt_wchar_use_facet(const locale *loc)
return (codecvt_wchar*)fac; return (codecvt_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
codecvt_wchar__Getcat(&fac, loc); codecvt_wchar__Getcat(&fac, loc);
obj = (codecvt_wchar*)fac; obj = (codecvt_wchar*)fac;
...@@ -3136,8 +3146,10 @@ static codecvt_wchar* codecvt_short_use_facet(const locale *loc) ...@@ -3136,8 +3146,10 @@ static codecvt_wchar* codecvt_short_use_facet(const locale *loc)
return (codecvt_wchar*)fac; return (codecvt_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
codecvt_short__Getcat(&fac, loc); codecvt_short__Getcat(&fac, loc);
obj = (codecvt_wchar*)fac; obj = (codecvt_wchar*)fac;
...@@ -3547,8 +3559,10 @@ static numpunct_char* numpunct_char_use_facet(const locale *loc) ...@@ -3547,8 +3559,10 @@ static numpunct_char* numpunct_char_use_facet(const locale *loc)
return (numpunct_char*)fac; return (numpunct_char*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
numpunct_char__Getcat(&fac, loc); numpunct_char__Getcat(&fac, loc);
obj = (numpunct_char*)fac; obj = (numpunct_char*)fac;
...@@ -3904,8 +3918,10 @@ static numpunct_wchar* numpunct_wchar_use_facet(const locale *loc) ...@@ -3904,8 +3918,10 @@ static numpunct_wchar* numpunct_wchar_use_facet(const locale *loc)
return (numpunct_wchar*)fac; return (numpunct_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
numpunct_wchar__Getcat(&fac, loc); numpunct_wchar__Getcat(&fac, loc);
obj = (numpunct_wchar*)fac; obj = (numpunct_wchar*)fac;
...@@ -3950,8 +3966,10 @@ static numpunct_wchar* numpunct_short_use_facet(const locale *loc) ...@@ -3950,8 +3966,10 @@ static numpunct_wchar* numpunct_short_use_facet(const locale *loc)
return (numpunct_wchar*)fac; return (numpunct_wchar*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
numpunct_short__Getcat(&fac, loc); numpunct_short__Getcat(&fac, loc);
obj = (numpunct_wchar*)fac; obj = (numpunct_wchar*)fac;
...@@ -4347,8 +4365,10 @@ num_get* num_get_wchar_use_facet(const locale *loc) ...@@ -4347,8 +4365,10 @@ num_get* num_get_wchar_use_facet(const locale *loc)
return (num_get*)fac; return (num_get*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
num_get_wchar__Getcat(&fac, loc); num_get_wchar__Getcat(&fac, loc);
obj = (num_get*)fac; obj = (num_get*)fac;
...@@ -4385,8 +4405,10 @@ static num_get* num_get_short_use_facet(const locale *loc) ...@@ -4385,8 +4405,10 @@ static num_get* num_get_short_use_facet(const locale *loc)
return (num_get*)fac; return (num_get*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
num_get_short__Getcat(&fac, loc); num_get_short__Getcat(&fac, loc);
obj = (num_get*)fac; obj = (num_get*)fac;
...@@ -5483,8 +5505,10 @@ num_get* num_get_char_use_facet(const locale *loc) ...@@ -5483,8 +5505,10 @@ num_get* num_get_char_use_facet(const locale *loc)
return (num_get*)fac; return (num_get*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
num_get_char__Getcat(&fac, loc); num_get_char__Getcat(&fac, loc);
obj = (num_get*)fac; obj = (num_get*)fac;
...@@ -6333,8 +6357,10 @@ num_put* num_put_char_use_facet(const locale *loc) ...@@ -6333,8 +6357,10 @@ num_put* num_put_char_use_facet(const locale *loc)
return (num_put*)fac; return (num_put*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
num_put_char__Getcat(&fac, loc); num_put_char__Getcat(&fac, loc);
obj = (num_put*)fac; obj = (num_put*)fac;
...@@ -6944,8 +6970,10 @@ num_put* num_put_wchar_use_facet(const locale *loc) ...@@ -6944,8 +6970,10 @@ num_put* num_put_wchar_use_facet(const locale *loc)
return (num_put*)fac; return (num_put*)fac;
} }
if(obj) if(obj) {
_Lockit_dtor(&lock);
return obj; return obj;
}
num_put_wchar__Getcat(&fac, loc); num_put_wchar__Getcat(&fac, loc);
obj = (num_put*)fac; obj = (num_put*)fac;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment