strcache-stubs-generic.cpp revision 0c8eec6f5b79d800c3d25b5c0e0d7ad3f867c25c
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsync * IPRT - String Cache, stub implementation.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * Copyright (C) 2009 Oracle Corporation
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * available from http://www.virtualbox.org. This file is free software;
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * you can redistribute it and/or modify it under the terms of the GNU
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * General Public License (GPL) as published by the Free Software
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * The contents of this file may alternatively be used under the terms
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * of the Common Development and Distribution License Version 1.0
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * VirtualBox OSE distribution, in which case the provisions of the
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * CDDL are applicable instead of those of the GPL.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * You may elect to license modified versions of this file under the
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync * terms and conditions of either the GPL or the CDDL or both.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync/*******************************************************************************
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync* Header Files *
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync*******************************************************************************/
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncRTDECL(int) RTStrCacheCreate(PRTSTRCACHE phStrCache, const char *pszName)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync AssertCompile(sizeof(RTSTRCACHE) == sizeof(RTMEMPOOL));
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync AssertCompileNS(NIL_RTSTRCACHE == (RTSTRCACHE)NIL_RTMEMPOOL);
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync AssertCompileNS(RTSTRCACHE_DEFAULT == (RTSTRCACHE)RTMEMPOOL_DEFAULT);
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync return RTMemPoolCreate((PRTMEMPOOL)phStrCache, pszName);
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncRTDECL(const char *) RTStrCacheEnterN(RTSTRCACHE hStrCache, const char *pchString, size_t cchString)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync return (const char *)RTMemPoolDupEx((RTMEMPOOL)hStrCache, pchString, cchString, 1);
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncRTDECL(const char *) RTStrCacheEnter(RTSTRCACHE hStrCache, const char *psz)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync return RTStrCacheEnterN(hStrCache, psz, strlen(psz));
if (!psz)
if (!psz)