Changeset 56224

Show
Ignore:
Timestamp:
10/10/08 15:51:26 (6 weeks ago)
Author:
FM
Message:

fix two bugs: 1) the missing NOT in the if (real) test; 2) the missing +1 in getID() function; add many checks and log messages

Location:
wxWidgets/trunk/utils/ifacecheck/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/utils/ifacecheck/src/ifacecheck.cpp

    r56188 r56224  
    302302        real = api->RecursiveUpwardFindMethod(m, &m_gccInterface); 
    303303 
    304         if (real) 
     304        if (!real) 
    305305        { 
    306306            bool exit = false; 
     
    344344                                                "'%s' all with different signatures:\n", 
    345345                                                overloads.GetCount(), m.GetName(), api->GetName()); 
    346                 else 
     346                else { 
    347347                    warning += wxString::Format(": in the real headers there is a method '%s' for '%s'" 
    348348                                                " but has different signature:\n", 
    349349                                                m.GetName(), api->GetName()); 
     350                } 
    350351 
    351352                // get a list of the prototypes with _all_ possible attributes: 
  • wxWidgets/trunk/utils/ifacecheck/src/xmlparser.cpp

    r56223 r56224  
    1 ///////////////////////////////////////////////////////////////////////////// 
     1    ///////////////////////////////////////////////////////////////////////////// 
    22// Name:        xmlparser.cpp 
    33// Purpose:     Parser of the API/interface XML files 
     
    122122 
    123123    if (g_verbose) 
     124    { 
    124125        LogMessage("Type '%s' does not match type '%s'", m_strType, m.m_strType); 
     126        LogMessage(" => TypeClean %s / %s;  IsConst %d / %d; IsStatic %d / %d; IsPointer %d / %d; IsReference %d / %d", 
     127                   m_strTypeClean, m.m_strTypeClean, IsConst(), m.IsConst(), 
     128                   IsStatic(), m.IsStatic(), IsPointer(), m.IsPointer(), 
     129                   IsReference(), m.IsReference()); 
     130    } 
    125131 
    126132    return false; 
     
    294300    if (GetReturnType() != m.GetReturnType() || 
    295301        GetName() != m.GetName()) 
    296         return false; 
     302    { 
     303        if (g_verbose) 
     304            LogMessage("The method '%s' does not match method '%s'; different names/rettype", GetName(), m.GetName()); 
     305        return false; 
     306    } 
    297307 
    298308    if (m_args.GetCount()!=m.m_args.GetCount()) { 
     
    320330        IsDeprecated() != m.IsDeprecated() || 
    321331        GetAccessSpecifier() != m.GetAccessSpecifier()) 
    322         return false; 
     332    { 
     333        if (g_verbose) 
     334            LogMessage("The method '%s' does not match method '%s'; different attributes", GetName(), m.GetName()); 
     335 
     336        return false; 
     337    } 
    323338 
    324339    // check everything else 
     
    470485                         m_strName, m_methods[i].GetAsString()); 
    471486                return false; 
    472                 ((wxClass*)this)->m_methods.RemoveAt(j); 
    473                 j--; 
     487 
     488                // fix the problem? 
     489                //((wxClass*)this)->m_methods.RemoveAt(j); 
     490                //j--; 
    474491            } 
    475492 
     
    662679bool getID(unsigned long *id, const wxString& str) 
    663680{ 
    664     const wxStringCharType * const start = str.wx_str(); 
     681    const wxStringCharType * const start = str.wx_str()+1; 
    665682    wxStringCharType *end; 
    666683#if wxUSE_UNICODE_WCHAR