mirror of
https://github.com/reactos/wine.git
synced 2025-02-10 06:14:29 +00:00
mshtml: Added nsACString_SetData function and use it instead of nsACString_Init when we return string value.
This commit is contained in:
parent
82a042d0df
commit
f609a768e7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user