diff --git a/v8js_convert.cc b/v8js_convert.cc index 8e2dba6..3ca93a7 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -28,6 +28,9 @@ extern "C" { #include #include +#if PHP_V8_API_VERSION < 3022000 +/* CopyablePersistentTraits is only part of V8 from 3.22.0 on, + to be compatible with lower versions add our own (compatible) version. */ namespace v8 { template struct CopyablePersistentTraits { @@ -40,7 +43,7 @@ namespace v8 { } }; } - +#endif typedef std::pair TemplateCacheKey; typedef v8::Persistent > TemplateCacheEntry;