Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: include/v8.h

Issue 14638003: deprecate WriteAscii and MayContainNonAscii (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1178
1179 /** 1179 /**
1180 * Returns the number of bytes in the UTF-8 encoded 1180 * Returns the number of bytes in the UTF-8 encoded
1181 * representation of this string. 1181 * representation of this string.
1182 */ 1182 */
1183 int Utf8Length() const; 1183 int Utf8Length() const;
1184 1184
1185 /** 1185 /**
1186 * This function is no longer useful. 1186 * This function is no longer useful.
1187 */ 1187 */
1188 // TODO(dcarney): deprecate 1188 V8_DEPRECATED(V8_INLINE(bool MayContainNonAscii()) const) { return true; }
1189 V8_INLINE(bool MayContainNonAscii()) const { return true; }
1190 1189
1191 /** 1190 /**
1192 * Returns whether this string contains only one byte data. 1191 * Returns whether this string contains only one byte data.
1193 */ 1192 */
1194 bool IsOneByte() const; 1193 bool IsOneByte() const;
1195 1194
1196 /** 1195 /**
1197 * Write the contents of the string to an external buffer. 1196 * Write the contents of the string to an external buffer.
1198 * If no arguments are given, expects the buffer to be large 1197 * If no arguments are given, expects the buffer to be large
1199 * enough to hold the entire string and NULL terminator. Copies 1198 * enough to hold the entire string and NULL terminator. Copies
(...skipping 24 matching lines...) Expand all
1224 NO_NULL_TERMINATION = 2, 1223 NO_NULL_TERMINATION = 2,
1225 PRESERVE_ASCII_NULL = 4 1224 PRESERVE_ASCII_NULL = 4
1226 }; 1225 };
1227 1226
1228 // 16-bit character codes. 1227 // 16-bit character codes.
1229 int Write(uint16_t* buffer, 1228 int Write(uint16_t* buffer,
1230 int start = 0, 1229 int start = 0,
1231 int length = -1, 1230 int length = -1,
1232 int options = NO_OPTIONS) const; 1231 int options = NO_OPTIONS) const;
1233 // ASCII characters. 1232 // ASCII characters.
1234 int WriteAscii(char* buffer, 1233 V8_DEPRECATED(int WriteAscii(char* buffer,
1235 int start = 0, 1234 int start = 0,
1236 int length = -1, 1235 int length = -1,
1237 int options = NO_OPTIONS) const; 1236 int options = NO_OPTIONS) const);
1238 // One byte characters. 1237 // One byte characters.
1239 int WriteOneByte(uint8_t* buffer, 1238 int WriteOneByte(uint8_t* buffer,
1240 int start = 0, 1239 int start = 0,
1241 int length = -1, 1240 int length = -1,
1242 int options = NO_OPTIONS) const; 1241 int options = NO_OPTIONS) const;
1243 // UTF-8 encoded characters. 1242 // UTF-8 encoded characters.
1244 int WriteUtf8(char* buffer, 1243 int WriteUtf8(char* buffer,
1245 int length = -1, 1244 int length = -1,
1246 int* nchars_ref = NULL, 1245 int* nchars_ref = NULL,
1247 int options = NO_OPTIONS) const; 1246 int options = NO_OPTIONS) const;
(...skipping 4331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5579 5578
5580 5579
5581 } // namespace v8 5580 } // namespace v8
5582 5581
5583 5582
5584 #undef V8EXPORT 5583 #undef V8EXPORT
5585 #undef TYPE_CHECK 5584 #undef TYPE_CHECK
5586 5585
5587 5586
5588 #endif // V8_H_ 5587 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698