~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/generic/strcache-stubs-generic.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
*   Header Files                                                               *
34
34
*******************************************************************************/
35
35
#include <iprt/strcache.h>
 
36
#include "internal/iprt.h"
36
37
 
37
38
#include <iprt/asm.h>
38
39
#include <iprt/assert.h>
49
50
    AssertCompile(RTSTRCACHE_DEFAULT == (RTSTRCACHE)RTMEMPOOL_DEFAULT);
50
51
    return RTMemPoolCreate((PRTMEMPOOL)phStrCache, pszName);
51
52
}
 
53
RT_EXPORT_SYMBOL(RTStrCacheCreate);
52
54
 
53
55
 
54
56
RTDECL(int) RTStrCacheDestroy(RTSTRCACHE hStrCache)
58
60
        return VINF_SUCCESS;
59
61
    return RTMemPoolDestroy((RTMEMPOOL)hStrCache);
60
62
}
 
63
RT_EXPORT_SYMBOL(RTStrCacheDestroy);
61
64
 
62
65
 
63
66
RTDECL(const char *) RTStrCacheEnterN(RTSTRCACHE hStrCache, const char *pchString, size_t cchString)
68
71
 
69
72
    return (const char *)RTMemPoolDupEx((RTMEMPOOL)hStrCache, pchString, cchString, 1);
70
73
}
 
74
RT_EXPORT_SYMBOL(RTStrCacheEnterN);
71
75
 
72
76
 
73
77
RTDECL(const char *) RTStrCacheEnter(RTSTRCACHE hStrCache, const char *psz)
74
78
{
75
79
    return RTStrCacheEnterN(hStrCache, psz, strlen(psz));
76
80
}
 
81
RT_EXPORT_SYMBOL(RTStrCacheEnter);
77
82
 
78
83
 
79
84
RTDECL(uint32_t) RTStrCacheRetain(const char *psz)
81
86
    AssertPtr(psz);
82
87
    return RTMemPoolRetain((void *)psz);
83
88
}
 
89
RT_EXPORT_SYMBOL(RTStrCacheRetain);
84
90
 
85
91
 
86
92
RTDECL(uint32_t) RTStrCacheRelease(RTSTRCACHE hStrCache, const char *psz)
89
95
        return 0;
90
96
    return RTMemPoolRelease((RTMEMPOOL)hStrCache, (void *)psz);
91
97
}
 
98
RT_EXPORT_SYMBOL(RTStrCacheRelease);
92
99
 
93
100
 
94
101
RTDECL(size_t) RTStrCacheLength(const char *psz)
97
104
        return 0;
98
105
    return strlen(psz);
99
106
}
 
107
RT_EXPORT_SYMBOL(RTStrCacheLength);
100
108