Gerald Pfeifer : msxml3: Use the existing READYSTATE type instead of creating our own enum READYSTATE (and mixing the two).

Alexandre Julliard julliard at winehq.org
Mon Oct 4 11:03:57 CDT 2010


Module: wine
Branch: master
Commit: 632a6c7904f00e10b6b0dd7fe7fa20dfe2d7d9e0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=632a6c7904f00e10b6b0dd7fe7fa20dfe2d7d9e0

Author: Gerald Pfeifer <gerald at pfeifer.com>
Date:   Sat Oct  2 01:05:23 2010 +0200

msxml3: Use the existing READYSTATE type instead of creating our own enum READYSTATE (and mixing the two).

---

 dlls/msxml3/httprequest.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index dfc8dae..8820e68 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -50,15 +50,6 @@ struct reqheader
     BSTR value;
 };
 
-enum READYSTATE
-{
-    STATE_UNINITIALIZED = 0,
-    STATE_LOADING       = 1,
-    STATE_LOADED        = 2,
-    STATE_INTERACTIVE   = 3,
-    STATE_COMPLETED     = 4
-};
-
 typedef struct
 {
     const struct IXMLHTTPRequestVtbl *lpVtbl;
@@ -571,7 +562,7 @@ static HRESULT WINAPI httprequest_open(IXMLHTTPRequest *iface, BSTR method, BSTR
     if (hr == S_OK)
         This->password = V_BSTR(&str);
 
-    httprequest_setreadystate(This, STATE_LOADING);
+    httprequest_setreadystate(This, READYSTATE_LOADING);
 
     return S_OK;
 }
@@ -584,7 +575,7 @@ static HRESULT WINAPI httprequest_setRequestHeader(IXMLHTTPRequest *iface, BSTR
     TRACE("(%p)->(%s %s)\n", This, debugstr_w(header), debugstr_w(value));
 
     if (!header || !*header) return E_INVALIDARG;
-    if (This->state != STATE_LOADING) return E_FAIL;
+    if (This->state != READYSTATE_LOADING) return E_FAIL;
     if (!value) return E_INVALIDARG;
 
     /* replace existing header value if already added */
@@ -634,7 +625,7 @@ static HRESULT WINAPI httprequest_send(IXMLHTTPRequest *iface, VARIANT varBody)
 
     TRACE("(%p)\n", This);
 
-    if (This->state != STATE_LOADING) return E_FAIL;
+    if (This->state != READYSTATE_LOADING) return E_FAIL;
 
     hr = BindStatusCallback_create(This, &bsc);
     if (FAILED(hr)) return hr;
@@ -771,7 +762,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
     req->async = FALSE;
     req->verb = -1;
     req->url = req->user = req->password = NULL;
-    req->state = STATE_UNINITIALIZED;
+    req->state = READYSTATE_UNINITIALIZED;
     req->bsc = NULL;
     list_init(&req->reqheaders);
 




More information about the wine-cvs mailing list