Index: src/api.h |
diff --git a/src/api.h b/src/api.h |
index bbd957a4a0fd4f71aa0cd00b56ec5c441a82f785..22c10dda141f2ea2f298e56027cc0abc9412fbf9 100644 |
--- a/src/api.h |
+++ b/src/api.h |
@@ -28,7 +28,7 @@ class Consts { |
template <typename T> inline T ToCData(v8::internal::Object* obj) { |
STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); |
- if (obj == v8::internal::Smi::kZero) return nullptr; |
+ if (obj == v8::internal::Smi::FromInt(0)) return nullptr; |
return reinterpret_cast<T>( |
reinterpret_cast<intptr_t>( |
v8::internal::Foreign::cast(obj)->foreign_address())); |
@@ -39,7 +39,7 @@ template <typename T> |
inline v8::internal::Handle<v8::internal::Object> FromCData( |
v8::internal::Isolate* isolate, T obj) { |
STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); |
- if (obj == nullptr) return handle(v8::internal::Smi::kZero, isolate); |
+ if (obj == nullptr) return handle(v8::internal::Smi::FromInt(0), isolate); |
return isolate->factory()->NewForeign( |
reinterpret_cast<v8::internal::Address>(reinterpret_cast<intptr_t>(obj))); |
} |