| OLD | NEW |
| 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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 | 1782 |
| 1783 /** | 1783 /** |
| 1784 * Converts an object to an ASCII string. | 1784 * Converts an object to an ASCII string. |
| 1785 * Useful if you want to print the object. | 1785 * Useful if you want to print the object. |
| 1786 * If conversion to a string fails (eg. due to an exception in the toString() | 1786 * If conversion to a string fails (eg. due to an exception in the toString() |
| 1787 * method of the object) then the length() method returns 0 and the * operator | 1787 * method of the object) then the length() method returns 0 and the * operator |
| 1788 * returns NULL. | 1788 * returns NULL. |
| 1789 */ | 1789 */ |
| 1790 class V8EXPORT AsciiValue { | 1790 class V8EXPORT AsciiValue { |
| 1791 public: | 1791 public: |
| 1792 // TODO(dcarney): deprecate |
| 1792 explicit AsciiValue(Handle<v8::Value> obj); | 1793 explicit AsciiValue(Handle<v8::Value> obj); |
| 1793 ~AsciiValue(); | 1794 ~AsciiValue(); |
| 1794 char* operator*() { return str_; } | 1795 char* operator*() { return str_; } |
| 1795 const char* operator*() const { return str_; } | 1796 const char* operator*() const { return str_; } |
| 1796 int length() const { return length_; } | 1797 int length() const { return length_; } |
| 1797 private: | 1798 private: |
| 1798 char* str_; | 1799 char* str_; |
| 1799 int length_; | 1800 int length_; |
| 1800 | 1801 |
| 1801 // Disallow copying and assigning. | 1802 // Disallow copying and assigning. |
| (...skipping 4187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5989 | 5990 |
| 5990 | 5991 |
| 5991 } // namespace v8 | 5992 } // namespace v8 |
| 5992 | 5993 |
| 5993 | 5994 |
| 5994 #undef V8EXPORT | 5995 #undef V8EXPORT |
| 5995 #undef TYPE_CHECK | 5996 #undef TYPE_CHECK |
| 5996 | 5997 |
| 5997 | 5998 |
| 5998 #endif // V8_H_ | 5999 #endif // V8_H_ |
| OLD | NEW |