mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-05 13:51:34 +00:00
Remove compatibility with PHP 7.1 and older (#63)
It means minimal PHP version is 7.2
This commit is contained in:
parent
4b9160b94d
commit
5081dab5fc
9 changed files with 517 additions and 550 deletions
38
php_gnupg_compat.h
Normal file
38
php_gnupg_compat.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
+--------------------------------------------------------------------+
|
||||
| PECL :: gnupg |
|
||||
+--------------------------------------------------------------------+
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
| modification, are permitted provided that the conditions mentioned |
|
||||
| in the accompanying LICENSE file are met. |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright (c) 2025, Jakub Zelenka <bukka@php.net> |
|
||||
+--------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef PHP_GNUPG_COMPAT_H
|
||||
#define PHP_GNUPG_COMPAT_H
|
||||
|
||||
/* ZEND_ACC_CTOR and ZEND_ACC_DTOR removed in PHP 7.4 */
|
||||
#ifndef ZEND_ACC_CTOR
|
||||
#define ZEND_ACC_CTOR 0
|
||||
#endif
|
||||
#ifndef ZEND_ACC_DTOR
|
||||
#define ZEND_ACC_DTOR 0
|
||||
#endif
|
||||
|
||||
/* zend_function_entry constness added in PHP 7.4 */
|
||||
#if PHP_VERSION_ID < 70400
|
||||
#define GNUPG_FUNCTION_ENTRY zend_function_entry
|
||||
#else
|
||||
#define GNUPG_FUNCTION_ENTRY const zend_function_entry
|
||||
#endif
|
||||
|
||||
/* object handlers comparison name changed in PHP 8.0 */
|
||||
#if PHP_VERSION_ID < 80000
|
||||
#define GNUPG_COMPARE_HANDLER_NAME compare_objects
|
||||
#else
|
||||
#define GNUPG_COMPARE_HANDLER_NAME compare
|
||||
#endif
|
||||
|
||||
#endif /* PHP_GNUPG_COMPAT_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue