@@ -167,13 +167,20 @@ bool php_phongo_manager_unregister(php_phongo_manager_t* manager);
167
167
#define PHONGO_CE_FINAL (ce ) \
168
168
do { \
169
169
ce->ce_flags |= ZEND_ACC_FINAL; \
170
- } while (0);
170
+ } while (0)
171
171
172
+ #if PHP_VERSION_ID < 80100
172
173
#define PHONGO_CE_DISABLE_SERIALIZATION (ce ) \
173
174
do { \
174
175
ce->serialize = zend_class_serialize_deny; \
175
176
ce->unserialize = zend_class_unserialize_deny; \
176
- } while (0);
177
+ } while (0)
178
+ #else
179
+ #define PHONGO_CE_DISABLE_SERIALIZATION (ce ) \
180
+ do { \
181
+ ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \
182
+ } while (0)
183
+ #endif
177
184
178
185
#define PHONGO_GET_PROPERTY_HASH_INIT_PROPS (is_debug , intern , props , size ) \
179
186
do { \
@@ -187,15 +194,15 @@ bool php_phongo_manager_unregister(php_phongo_manager_t* manager);
187
194
zend_hash_init((props), (size), NULL, ZVAL_PTR_DTOR, 0); \
188
195
(intern)->properties = (props); \
189
196
} \
190
- } while (0);
197
+ } while (0)
191
198
192
199
#define PHONGO_GET_PROPERTY_HASH_FREE_PROPS (is_debug , props ) \
193
200
do { \
194
201
if (is_debug) { \
195
202
zend_hash_destroy((props)); \
196
203
FREE_HASHTABLE(props); \
197
204
} \
198
- } while (0);
205
+ } while (0)
199
206
200
207
#define PHONGO_ZVAL_CLASS_OR_TYPE_NAME (zv ) (Z_TYPE(zv) == IS_OBJECT ? ZSTR_VAL(Z_OBJCE(zv)->name) : zend_get_type_by_const(Z_TYPE(zv)))
201
208
#define PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P (zvp ) PHONGO_ZVAL_CLASS_OR_TYPE_NAME(*(zvp))
@@ -205,15 +212,15 @@ bool php_phongo_manager_unregister(php_phongo_manager_t* manager);
205
212
#define PHONGO_SET_CREATED_BY_PID (intern ) \
206
213
do { \
207
214
(intern)->created_by_pid = (int) getpid(); \
208
- } while (0);
215
+ } while (0)
209
216
210
217
#define PHONGO_RESET_CLIENT_IF_PID_DIFFERS (intern , manager ) \
211
218
do { \
212
219
int pid = (int) getpid(); \
213
220
if ((intern)->created_by_pid != pid) { \
214
221
php_phongo_client_reset_once((manager), pid); \
215
222
} \
216
- } while (0);
223
+ } while (0)
217
224
218
225
#endif /* PHONGO_H */
219
226
0 commit comments