Skip to content
Browse files

fixups for crazybertje1984@hotmail.com

  • Loading branch information...
1 parent 7396716 commit a647cec726d0591db8783487a475158e8046ee3c @bnoordhuis committed Mar 2, 2012
Showing with 8 additions and 8 deletions.
  1. +3 −3 deps/v8/include/v8.h
  2. +3 −3 src/node_unicode.cc
  3. +2 −2 src/node_unicode.h
View
6 deps/v8/include/v8.h
@@ -1343,7 +1343,7 @@ class String : public Primitive {
static const int kParentStackSize = 1024;
public:
- static enum StorageType {
+ enum StorageType {
kNone = 0,
kAscii = 1,
kTwoByte = 2
@@ -1413,13 +1413,13 @@ class String : public Primitive {
class V8EXPORT WriteMemory
: public WriteMemoryImpl<uint16_t> {
public:
- WriteMemory(int length): WriteMemoryImpl(length) {}
+ WriteMemory(int length): WriteMemoryImpl<uint16_t>(length) {}
};
class V8EXPORT WriteAsciiMemory
: public WriteMemoryImpl<char> {
public:
- WriteAsciiMemory(int length): WriteMemoryImpl(length) {}
+ WriteAsciiMemory(int length): WriteMemoryImpl<char>(length) {}
};
private:
View
6 src/node_unicode.cc
@@ -46,7 +46,7 @@ static inline ssize_t string_to_utf8(Handle<String> value, char* dest, ssize_t d
for(String::ReadMemory it(value); *it; it.Next()) {
switch (it.storage_type()) {
- case it.kAscii: {
+ case String::ReadMemory::kAscii: {
// If the previous iteration stopped halfway inside a surrogate
// pair, emit replacement character and reset.
if (lead_surrogate) {
@@ -72,9 +72,9 @@ static inline ssize_t string_to_utf8(Handle<String> value, char* dest, ssize_t d
} else {
const char* pos = reinterpret_cast<const char*>(*it);
const char* end = pos + tocopy;
- for ( ; pos <= end - sizeof intptr_t; pos += sizeof intptr_t) {
+ for ( ; pos <= end - sizeof(intptr_t); pos += sizeof(intptr_t)) {
*reinterpret_cast<intptr_t*>(dest_pos) = *reinterpret_cast<const intptr_t*>(pos);
- dest_pos += sizeof intptr_t;
+ dest_pos += sizeof(intptr_t);
}
for ( ; pos < end; pos++) {
*(dest_pos++) = *pos;
View
4 src/node_unicode.h
@@ -25,7 +25,7 @@ class Utf8Writer {
~Utf8Writer() {}
ssize_t utf8_length();
- ssize_t Utf8Writer::Write(char* dest, ssize_t size);
+ ssize_t Write(char* dest, ssize_t size);
private:
ssize_t utf8_length_;
@@ -34,4 +34,4 @@ class Utf8Writer {
} // namespace node
-#endif // node_unicode_h
+#endif // node_unicode_h

0 comments on commit a647cec

Please sign in to comment.
Something went wrong with that request. Please try again.