Commit f609a768 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added nsACString_SetData function and use it instead of nsACString_Init…

mshtml: Added nsACString_SetData function and use it instead of nsACString_Init when we return string value.
parent 82a042d0
......@@ -332,6 +332,7 @@ void *nsalloc(size_t);
void nsfree(void*);
void nsACString_Init(nsACString*,const char*);
void nsACString_SetData(nsACString*,const char*);
PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*);
void nsACString_Finish(nsACString*);
......
......@@ -422,7 +422,12 @@ void nsACString_Init(nsACString *str, const char *data)
{
NS_CStringContainerInit(str);
if(data)
NS_CStringSetData(str, data, PR_UINT32_MAX);
nsACString_SetData(str, data);
}
void nsACString_SetData(nsACString *str, const char *data)
{
NS_CStringSetData(str, data, PR_UINT32_MAX);
}
PRUint32 nsACString_GetData(const nsACString *str, const char **data, PRBool *termited)
......
......@@ -475,7 +475,7 @@ static nsresult NSAPI nsChannel_GetContentType(nsIHttpChannel *iface, nsACString
TRACE("(%p)->(%p)\n", This, aContentType);
if(This->content) {
nsACString_Init(aContentType, This->content);
nsACString_SetData(aContentType, This->content);
return S_OK;
}
......@@ -483,7 +483,7 @@ static nsresult NSAPI nsChannel_GetContentType(nsIHttpChannel *iface, nsACString
return nsIChannel_GetContentType(This->channel, aContentType);
TRACE("returning default text/html\n");
nsACString_Init(aContentType, "text/html");
nsACString_SetData(aContentType, "text/html");
return NS_OK;
}
......@@ -1154,7 +1154,7 @@ static nsresult NSAPI nsURI_GetSpec(nsIWineURI *iface, nsACString *aSpec)
return nsIURI_GetSpec(This->uri, aSpec);
if(This->spec) {
nsACString_Init(aSpec, This->spec);
nsACString_SetData(aSpec, This->spec);
return NS_OK;
}
......
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