Add explicit check for expected PHP version
Should give a clearer error if PHP7 bindings are compiled against PHP5 or vice versa.
This commit is contained in:
parent
0ada392cee
commit
774311f11e
2 changed files with 10 additions and 0 deletions
|
|
@ -11,6 +11,11 @@ extern "C" {
|
|||
#include "zend_API.h"
|
||||
#include "zend_exceptions.h"
|
||||
#include "php.h"
|
||||
|
||||
#if PHP_MAJOR_VERSION != 5
|
||||
# error These bindings need PHP5 - to generate PHP7 bindings use: swig -php7
|
||||
#endif
|
||||
|
||||
#include "ext/standard/php_string.h"
|
||||
#include <stdlib.h> /* for abort(), used in generated code. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue