]> git.pld-linux.org Git - packages/linux-gpib.git/blob - linux-gpib-php7.patch
- rel 4
[packages/linux-gpib.git] / linux-gpib-php7.patch
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 @@
27         memset(p,0,len+1);
28         r=ibrd(n,p,len);
29         p[ibcnt]='\0';
30 +#if PHP_MAJOR_VERSION >= 7
31 +       ZVAL_STRING(z,p);
32 +#else
33         ZVAL_STRING(z,p,1);
34 +#endif
35         efree(p);
36         RETURN_LONG(r);
37  }
This page took 0.063638 seconds and 3 git commands to generate.