소스 검색

Fix CopyablePersistentTraits for v8 3.21.15 .. 3.21.18.x

Stefan Siegl 11 년 전
부모
커밋
988691d2dc
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      v8js_convert.cc

+ 7 - 1
v8js_convert.cc

@@ -37,8 +37,14 @@ namespace v8 {
 		typedef Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent;
 		static const bool kResetInDestructor = true;
 		template<class S, class M>
+#if PHP_V8_API_VERSION >= 3021015
+		static V8_INLINE void Copy(const Persistent<S, M>& source,
+								   CopyablePersistent* dest)
+#else
 		V8_INLINE(static void Copy(const Persistent<S, M>& source,
-								   CopyablePersistent* dest)) {
+								   CopyablePersistent* dest))
+#endif
+		{
 			// do nothing, just allow copy
 		}
 	};