php-gnupg/php_gnupg_compat.h
Jakub Zelenka 5081dab5fc
Remove compatibility with PHP 7.1 and older (#63)
It means minimal PHP version is 7.2
2025-12-06 17:34:02 +01:00

38 lines
No EOL
1.3 KiB
C

/*
+--------------------------------------------------------------------+
| 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 */