summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:58:11 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:58:11 +0000
commitd3a94165c9dc2f5142613304efa7c8e13c69fc8e (patch)
tree1bfdffdf1b9351df144ca77e454c92d761a8da8d /base
parentaa573b305e7350bbfa6f9659dc36ce62d877e574 (diff)
downloadchromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.zip
chromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.tar.gz
chromium_src-d3a94165c9dc2f5142613304efa7c8e13c69fc8e.tar.bz2
Port the spell checker to posix.
It all builds but does not link yet. Review URL: http://codereview.chromium.org/14408 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/basictypes.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/base/basictypes.h b/base/basictypes.h
index 36156e43..a954426 100644
--- a/base/basictypes.h
+++ b/base/basictypes.h
@@ -102,7 +102,7 @@ const DomainId kIllegalDomainId = static_cast<DomainId>(0);
//
// One caveat is that arraysize() doesn't accept any array of an
// anonymous type or a type defined inside a function. In these rare
-// cases, you have to use the unsafe ARRAYSIZE() macro below. This is
+// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below. This is
// due to a limitation in C++'s template system. The limitation might
// eventually be removed, but it hasn't happened yet.
@@ -122,26 +122,26 @@ char (&ArraySizeHelper(const T (&array)[N]))[N];
#define arraysize(array) (sizeof(ArraySizeHelper(array)))
-// ARRAYSIZE performs essentially the same calculation as arraysize,
+// ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize,
// but can be used on anonymous types or types defined inside
// functions. It's less safe than arraysize as it accepts some
// (although not all) pointers. Therefore, you should use arraysize
// whenever possible.
//
-// The expression ARRAYSIZE(a) is a compile-time constant of type
+// The expression ARRAYSIZE_UNSAFE(a) is a compile-time constant of type
// size_t.
//
-// ARRAYSIZE catches a few type errors. If you see a compiler error
+// ARRAYSIZE_UNSAFE catches a few type errors. If you see a compiler error
//
// "warning: division by zero in ..."
//
-// when using ARRAYSIZE, you are (wrongfully) giving it a pointer.
-// You should only use ARRAYSIZE on statically allocated arrays.
+// when using ARRAYSIZE_UNSAFE, you are (wrongfully) giving it a pointer.
+// You should only use ARRAYSIZE_UNSAFE on statically allocated arrays.
//
// The following comments are on the implementation details, and can
// be ignored by the users.
//
-// ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in
+// ARRAYSIZE_UNSAFE(arr) works by inspecting sizeof(arr) (the # of bytes in
// the array) and sizeof(*(arr)) (the # of bytes in one array
// element). If the former is divisible by the latter, perhaps arr is
// indeed an array, in which case the division result is the # of
@@ -223,7 +223,7 @@ inline To down_cast(From* f) { // so we only accept pointers
// expression is true. For example, you could use it to verify the
// size of a static array:
//
-// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
+// COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
// content_type_names_incorrect_size);
//
// or to make sure a struct is smaller than a certain size: