Changeset 103458 in vbox for trunk/src/libs/xpcom18a4/xpcom/reflect
- Timestamp:
- Feb 19, 2024 5:00:08 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161792
- Location:
- trunk/src/libs/xpcom18a4/xpcom/reflect
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
r102506 r103458 49 49 static int DoMultipleInheritenceTest(int rcExit); 50 50 static int DoMultipleInheritenceTest2(int rcExit); 51 #if 0 /*unused*/ 51 52 static void DoSpeedTest(); 53 #endif 52 54 53 55 … … 1413 1415 } 1414 1416 1417 #if 0 /*unused*/ 1415 1418 static void DoSpeedTest() 1416 1419 { … … 1464 1467 (double)(interval_invoke-interval_direct)/(double)interval_invoke*100); 1465 1468 } 1469 #endif -
trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
r102457 r103458 1812 1812 } 1813 1813 1814 #ifdef VBOX1815 /*1816 * From nsprpub, only caller below.1817 *1818 * @todo r=aeichner Implement an IPRT equivalent and replace.1819 */1820 static char *PL_strnstr(const char *big, const char *little, PRUint32 max)1821 {1822 size_t ll;1823 1824 if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;1825 if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;1826 1827 ll = strlen(little);1828 if( ll > (size_t)max ) return (char *)0;1829 max -= (PRUint32)ll;1830 max++;1831 1832 for( ; max && *big; big++, max-- )1833 if( *little == *big )1834 if( 0 == strncmp(big, little, ll) )1835 return (char *)big;1836 1837 return (char *)0;1838 }1839 #endif1840 1841 struct ArrayAndPrefix1842 {1843 nsISupportsArray* array;1844 const char* prefix;1845 PRUint32 length;1846 };1847 1848 PR_STATIC_CALLBACK(PLDHashOperator)1849 xpti_ArrayPrefixAppender(PLDHashTable *table, PLDHashEntryHdr *hdr,1850 PRUint32 number, void *arg)1851 {1852 xptiInterfaceEntry* entry = ((xptiHashEntry*)hdr)->value;1853 ArrayAndPrefix* args = (ArrayAndPrefix*) arg;1854 1855 const char* name = entry->GetTheName();1856 if(name != PL_strnstr(name, args->prefix, args->length))1857 return PL_DHASH_NEXT;1858 1859 nsCOMPtr<nsIInterfaceInfo> ii;1860 if(NS_SUCCEEDED(EntryToInfo(entry, getter_AddRefs(ii))))1861 args->array->AppendElement(ii);1862 return PL_DHASH_NEXT;1863 }1864 1865 1814 /* void autoRegisterInterfaces (); */ 1866 1815 NS_IMETHODIMP xptiInterfaceInfoManager::AutoRegisterInterfaces()
Note:
See TracChangeset
for help on using the changeset viewer.