⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
src
/
mongodb-1.11.1
/
View File Name :
phongo_compat.c
/* * Copyright 2015-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Our Compatability header */ #include "phongo_compat.h" void phongo_add_exception_prop(const char* prop, int prop_len, zval* value) { if (EG(exception)) { zval ex; ZVAL_OBJ(&ex, EG(exception)); zend_update_property(Z_OBJCE(ex), PHONGO_COMPAT_OBJ_P(&ex), prop, prop_len, value); } } #ifdef ZEND_HASH_GET_APPLY_COUNT /* PHP 7.2 or earlier recursion protection */ zend_bool php_phongo_zend_hash_apply_protection_begin(HashTable* ht) { if (!ht) { return 1; } if (ZEND_HASH_GET_APPLY_COUNT(ht) > 0) { return 0; } if (ZEND_HASH_APPLY_PROTECTION(ht)) { ZEND_HASH_INC_APPLY_COUNT(ht); } return 1; } zend_bool php_phongo_zend_hash_apply_protection_end(HashTable* ht) { if (!ht) { return 1; } if (ZEND_HASH_GET_APPLY_COUNT(ht) == 0) { return 0; } if (ZEND_HASH_APPLY_PROTECTION(ht)) { ZEND_HASH_DEC_APPLY_COUNT(ht); } return 1; } #else /* PHP 7.3 or later */ zend_bool php_phongo_zend_hash_apply_protection_begin(zend_array* ht) { if (GC_IS_RECURSIVE(ht)) { return 0; } if (!(GC_FLAGS(ht) & GC_IMMUTABLE)) { GC_PROTECT_RECURSION(ht); } return 1; } zend_bool php_phongo_zend_hash_apply_protection_end(zend_array* ht) { if (!GC_IS_RECURSIVE(ht)) { return 0; } if (!(GC_FLAGS(ht) & GC_IMMUTABLE)) { GC_UNPROTECT_RECURSION(ht); } return 1; } #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */