Delete char32 from base/basictypes.h.

(Convert its one use to use int32_t instead.)

R=brettw@chromium.org
TBR=rsleevi@chromium.org
BUG=138542

Review URL: https://codereview.chromium.org/125103006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243209 0039d316-1c4b-4281-b951-d872f2087c98
parent 3109fbb7
......@@ -43,13 +43,6 @@ typedef long long int64;
typedef unsigned long long uint64;
#endif
// A type to represent a Unicode code-point value. As of Unicode 4.0,
// such values require up to 21 bits.
// (For type-checking on pointers, make this explicitly signed,
// and it should always be the signed version of whatever int32 is.)
// TODO(vtl): This is almost completely unused in Chromium. Delete it?
typedef signed int char32;
const uint8 kuint8max = (( uint8) 0xFF);
const uint16 kuint16max = ((uint16) 0xFFFF);
const uint32 kuint32max = ((uint32) 0xFFFFFFFF);
......
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/cert/x509_cert_types.h"
#include <stdint.h>
#include <CoreServices/CoreServices.h>
#include <Security/SecAsn1Coder.h>
#include <Security/Security.h>
......@@ -130,7 +132,7 @@ bool UTF16BigEndianToUTF8(base::char16* chars, size_t length,
// Converts big-endian UTF-32 to UTF-8 in a std::string.
// Note: The byte-order flipping is done in place on the input buffer!
bool UTF32BigEndianToUTF8(char32* chars, size_t length,
bool UTF32BigEndianToUTF8(int32_t* chars, size_t length,
std::string* out_string) {
for (size_t i = 0; i < length; ++i)
chars[i] = EndianS32_BtoN(chars[i]);
......@@ -250,8 +252,8 @@ bool CertPrincipal::ParseDistinguishedName(const void* ber_name_data,
}
case BER_TAG_PKIX_UNIVERSAL_STRING: { // UTF-32, big-endian
std::string value;
UTF32BigEndianToUTF8(reinterpret_cast<char32*>(pair->value.Data),
pair->value.Length / sizeof(char32),
UTF32BigEndianToUTF8(reinterpret_cast<int32_t*>(pair->value.Data),
pair->value.Length / sizeof(int32_t),
&value);
AddTypeValuePair(pair->type, value, values);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment