Skip to content

Commit

Permalink
fixups for crazybertje1984@hotmail.com
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Mar 2, 2012
1 parent 7396716 commit a647cec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions deps/v8/include/v8.h
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/node_unicode.cc
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/node_unicode.h
Expand Up @@ -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_;
Expand All @@ -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.