]>
Commit | Line | Data |
---|---|---|
76a67c9a JB |
1 | --- linux-gpib-4.0.3/language/php/gpib.c.orig 2016-04-09 15:33:09.000000000 +0200 |
2 | +++ linux-gpib-4.0.3/language/php/gpib.c 2016-07-14 16:47:47.929605503 +0200 | |
3 | @@ -60,6 +60,10 @@ | |
4 | #include "php.h" | |
5 | #include "ext/standard/info.h" | |
6 | ||
7 | +#if PHP_MAJOR_VERSION >= 7 | |
8 | +#define PZVAL_IS_REF(pz) Z_ISREF_P(pz) | |
9 | +#endif | |
10 | + | |
11 | /* ---- macros for declarations -------------------------- */ | |
12 | ||
13 | #define FUN_ACCESSOR(functionName) \ | |
14 | @@ -495,7 +499,11 @@ | |
15 | ) == FAILURE) { | |
16 | return; | |
17 | } | |
18 | +#if PHP_MAJOR_VERSION >= 7 | |
19 | + RETURN_STRING((char*)gpib_error_string(n)); | |
20 | +#else | |
21 | RETURN_STRING((char*)gpib_error_string(n), 1); | |
22 | +#endif | |
23 | } | |
24 | #endif | |
25 | ||
26 | @@ -550,7 +558,11 @@ | |
4a228785 | 27 | memset(p,0,len+1); |
76a67c9a | 28 | r=ibrd(n,p,len); |
4a228785 | 29 | p[ibcnt]='\0'; |
76a67c9a | 30 | +#if PHP_MAJOR_VERSION >= 7 |
4a228785 | 31 | + ZVAL_STRING(z,p); |
76a67c9a | 32 | +#else |
4a228785 | 33 | ZVAL_STRING(z,p,1); |
76a67c9a | 34 | +#endif |
4a228785 | 35 | efree(p); |
76a67c9a JB |
36 | RETURN_LONG(r); |
37 | } |