File tree 4 files changed +20
-14
lines changed
4 files changed +20
-14
lines changed Original file line number Diff line number Diff line change
1
+ -std=c++11
2
+ -Wno-pragma-once-outside-header
Original file line number Diff line number Diff line change @@ -28,8 +28,23 @@ NAME = php-js
28
28
# PHP installations use a conf.d directory that holds a set of config files,
29
29
# one for each extension. Use this variable to specify this directory.
30
30
#
31
+ # In Ubuntu 14.04 Apache 2.4 is used, which uses the mods-available directory
32
+ # instead of a conf.d directory. In 16.04 the directory changed yet again.
33
+ # This has to be checked.
34
+ #
35
+
36
+ UBUNTU_MAJOR := $(shell /usr/bin/lsb_release -r -s | cut -f1 -d.)
37
+ OVER_SIXTEEN := $(shell echo "${UBUNTU_MAJOR} >= 16" | bc)
38
+ OVER_FOURTEEN := $(shell echo "${UBUNTU_MAJOR} >= 14" | bc)
39
+
40
+ ifeq (${OVER_SIXTEEN}, 1)
41
+ INI_DIR = /etc/php/7.0/mods-available/
42
+ else ifeq (${OVER_FOURTEEN}, 1)
43
+ INI_DIR = /etc/php5/mods-available/
44
+ else
45
+ INI_DIR = /etc/php5/conf.d/
46
+ endif
31
47
32
- INI_DIR = /etc/php5/mods-available/
33
48
34
49
35
50
#
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class External
47
47
*
48
48
* @param data callback data
49
49
*/
50
- static void destructor (const v8::WeakCallbackData<v8::Value, External> &data)
50
+ static void destructor (const v8::WeakCallbackInfo< External> &data)
51
51
{
52
52
// stop tracking the external reference
53
53
Context::current ()->untrack (data.GetParameter ());
@@ -92,7 +92,7 @@ class External
92
92
{
93
93
// create the persistent handle and make it weak
94
94
_persistent.Reset (Isolate::get (), handle);
95
- _persistent.SetWeak <External>(this , &destructor);
95
+ _persistent.SetWeak <External>(this , &destructor, v8::WeakCallbackType:: kParameter );
96
96
}
97
97
98
98
/* *
Original file line number Diff line number Diff line change @@ -40,17 +40,6 @@ class Handle
40
40
* @var v8::Handle<v8::External>
41
41
*/
42
42
v8::Local<v8::External> _handle;
43
-
44
- /* *
45
- * The destructor callback to clean up the object
46
- *
47
- * @param data callback data
48
- */
49
- static void destructor (const v8::WeakCallbackData<v8::Value, External> &data)
50
- {
51
- // delete the object
52
- delete data.GetParameter ();
53
- }
54
43
public:
55
44
/* *
56
45
* Constructor
You can’t perform that action at this time.
0 commit comments