1999-04-08 02:10:10 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Zend Engine |
|
|
|
|
+----------------------------------------------------------------------+
|
2019-01-30 17:23:29 +08:00
|
|
|
| Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
|
1999-04-08 02:10:10 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2001-12-11 23:16:21 +08:00
|
|
|
| This source file is subject to version 2.00 of the Zend license, |
|
2015-01-03 17:22:58 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2001-12-11 23:16:21 +08:00
|
|
|
| http://www.zend.com/license/2_00.txt. |
|
1999-07-16 22:58:16 +08:00
|
|
|
| If you did not receive a copy of the Zend license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@zend.com so we can mail you a copy immediately. |
|
1999-04-08 02:10:10 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2018-11-01 23:20:07 +08:00
|
|
|
| Authors: Andi Gutmans <andi@php.net> |
|
|
|
|
| Zeev Suraski <zeev@php.net> |
|
1999-04-08 02:10:10 +08:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
1999-09-04 03:12:07 +08:00
|
|
|
/* resource lists */
|
|
|
|
|
1999-04-08 02:10:10 +08:00
|
|
|
#include "zend.h"
|
|
|
|
#include "zend_list.h"
|
|
|
|
#include "zend_API.h"
|
|
|
|
#include "zend_globals.h"
|
|
|
|
|
1999-06-04 19:44:02 +08:00
|
|
|
ZEND_API int le_index_ptr;
|
1999-04-08 02:10:10 +08:00
|
|
|
|
2000-04-15 21:02:22 +08:00
|
|
|
/* true global */
|
|
|
|
static HashTable list_destructors;
|
|
|
|
|
2017-12-14 18:50:39 +08:00
|
|
|
ZEND_API zval* ZEND_FASTCALL zend_list_insert(void *ptr, int type)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2014-02-10 14:04:30 +08:00
|
|
|
zval zv;
|
2001-03-28 23:22:15 +08:00
|
|
|
|
2021-08-31 16:46:22 +08:00
|
|
|
zend_long index = zend_hash_next_free_element(&EG(regular_list));
|
2014-04-30 22:32:42 +08:00
|
|
|
if (index == 0) {
|
|
|
|
index = 1;
|
2021-08-31 16:46:22 +08:00
|
|
|
} else if (index == ZEND_LONG_MAX) {
|
2021-08-30 22:31:28 +08:00
|
|
|
zend_error_noreturn(E_ERROR, "Resource ID space overflow");
|
2014-04-30 22:32:42 +08:00
|
|
|
}
|
2014-02-10 14:04:30 +08:00
|
|
|
ZVAL_NEW_RES(&zv, index, ptr, type);
|
2014-05-27 04:38:58 +08:00
|
|
|
return zend_hash_index_add_new(&EG(regular_list), index, &zv);
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
ZEND_API zend_result ZEND_FASTCALL zend_list_delete(zend_resource *res)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2017-10-27 06:28:58 +08:00
|
|
|
if (GC_DELREF(res) <= 0) {
|
2014-02-10 14:04:30 +08:00
|
|
|
return zend_hash_index_del(&EG(regular_list), res->handle);
|
1999-04-08 02:10:10 +08:00
|
|
|
} else {
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-15 16:49:44 +08:00
|
|
|
ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res)
|
2014-05-08 06:48:31 +08:00
|
|
|
{
|
2020-04-15 16:49:44 +08:00
|
|
|
ZEND_ASSERT(GC_REFCOUNT(res) == 0);
|
|
|
|
zend_hash_index_del(&EG(regular_list), res->handle);
|
2014-05-08 06:48:31 +08:00
|
|
|
}
|
2014-04-11 06:21:06 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
static void zend_resource_dtor(zend_resource *res)
|
2014-04-11 06:21:06 +08:00
|
|
|
{
|
|
|
|
zend_rsrc_list_dtors_entry *ld;
|
2015-04-20 11:48:21 +08:00
|
|
|
zend_resource r = *res;
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2015-04-20 11:48:21 +08:00
|
|
|
res->type = -1;
|
|
|
|
res->ptr = NULL;
|
|
|
|
|
|
|
|
ld = zend_hash_index_find_ptr(&list_destructors, r.type);
|
2020-09-21 20:58:23 +08:00
|
|
|
ZEND_ASSERT(ld && "Unknown list entry type");
|
|
|
|
|
|
|
|
if (ld->list_dtor_ex) {
|
|
|
|
ld->list_dtor_ex(&r);
|
2014-04-11 06:21:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
ZEND_API void ZEND_FASTCALL zend_list_close(zend_resource *res)
|
2014-02-27 16:28:55 +08:00
|
|
|
{
|
2014-04-02 18:34:44 +08:00
|
|
|
if (GC_REFCOUNT(res) <= 0) {
|
2020-04-15 16:49:44 +08:00
|
|
|
zend_list_free(res);
|
2014-02-27 16:28:55 +08:00
|
|
|
} else if (res->type >= 0) {
|
2014-12-14 06:06:14 +08:00
|
|
|
zend_resource_dtor(res);
|
2014-02-27 16:28:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-02 13:23:16 +08:00
|
|
|
ZEND_API zend_resource* zend_register_resource(void *rsrc_pointer, int rsrc_type)
|
2000-01-16 06:52:24 +08:00
|
|
|
{
|
2014-02-10 14:04:30 +08:00
|
|
|
zval *zv;
|
1999-10-12 22:51:17 +08:00
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
zv = zend_list_insert(rsrc_pointer, rsrc_type);
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2015-02-02 13:23:16 +08:00
|
|
|
return Z_RES_P(zv);
|
1999-09-04 03:12:07 +08:00
|
|
|
}
|
|
|
|
|
2015-02-02 14:45:19 +08:00
|
|
|
ZEND_API void *zend_fetch_resource2(zend_resource *res, const char *resource_type_name, int resource_type1, int resource_type2)
|
1999-09-04 03:12:07 +08:00
|
|
|
{
|
2015-07-14 10:44:51 +08:00
|
|
|
if (res) {
|
|
|
|
if (resource_type1 == res->type) {
|
|
|
|
return res->ptr;
|
|
|
|
}
|
2015-02-02 13:23:16 +08:00
|
|
|
|
2015-07-14 10:44:51 +08:00
|
|
|
if (resource_type2 == res->type) {
|
|
|
|
return res->ptr;
|
|
|
|
}
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (resource_type_name) {
|
|
|
|
const char *space;
|
|
|
|
const char *class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): supplied resource is not a valid %s resource", class_name, space, get_active_function_name(), resource_type_name);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ZEND_API void *zend_fetch_resource(zend_resource *res, const char *resource_type_name, int resource_type)
|
|
|
|
{
|
|
|
|
if (resource_type == res->type) {
|
|
|
|
return res->ptr;
|
1999-09-04 03:12:07 +08:00
|
|
|
}
|
1999-10-13 20:59:48 +08:00
|
|
|
|
2000-06-16 03:09:51 +08:00
|
|
|
if (resource_type_name) {
|
2015-02-02 13:23:16 +08:00
|
|
|
const char *space;
|
|
|
|
const char *class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): supplied resource is not a valid %s resource", class_name, space, get_active_function_name(), resource_type_name);
|
2000-06-16 03:09:51 +08:00
|
|
|
}
|
1999-10-13 20:59:48 +08:00
|
|
|
|
1999-09-04 03:12:07 +08:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-02-02 13:23:16 +08:00
|
|
|
ZEND_API void *zend_fetch_resource_ex(zval *res, const char *resource_type_name, int resource_type)
|
|
|
|
{
|
|
|
|
const char *space, *class_name;
|
|
|
|
if (res == NULL) {
|
|
|
|
if (resource_type_name) {
|
|
|
|
class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): no %s resource supplied", class_name, space, get_active_function_name(), resource_type_name);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
if (Z_TYPE_P(res) != IS_RESOURCE) {
|
|
|
|
if (resource_type_name) {
|
|
|
|
class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): supplied argument is not a valid %s resource", class_name, space, get_active_function_name(), resource_type_name);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return zend_fetch_resource(Z_RES_P(res), resource_type_name, resource_type);
|
|
|
|
}
|
|
|
|
|
2015-02-02 14:45:19 +08:00
|
|
|
ZEND_API void *zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type1, int resource_type2)
|
2015-02-02 13:23:16 +08:00
|
|
|
{
|
|
|
|
const char *space, *class_name;
|
|
|
|
if (res == NULL) {
|
|
|
|
if (resource_type_name) {
|
|
|
|
class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): no %s resource supplied", class_name, space, get_active_function_name(), resource_type_name);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
if (Z_TYPE_P(res) != IS_RESOURCE) {
|
|
|
|
if (resource_type_name) {
|
|
|
|
class_name = get_active_class_name(&space);
|
2019-05-31 17:51:54 +08:00
|
|
|
zend_type_error("%s%s%s(): supplied argument is not a valid %s resource", class_name, space, get_active_function_name(), resource_type_name);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-02-02 14:45:19 +08:00
|
|
|
return zend_fetch_resource2(Z_RES_P(res), resource_type_name, resource_type1, resource_type2);
|
2015-02-02 13:23:16 +08:00
|
|
|
}
|
|
|
|
|
2014-02-10 14:04:30 +08:00
|
|
|
void list_entry_destructor(zval *zv)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2014-02-10 14:04:30 +08:00
|
|
|
zend_resource *res = Z_RES_P(zv);
|
2014-02-27 16:28:55 +08:00
|
|
|
|
2015-04-20 11:48:21 +08:00
|
|
|
ZVAL_UNDEF(zv);
|
2014-02-27 16:28:55 +08:00
|
|
|
if (res->type >= 0) {
|
2014-12-14 06:06:14 +08:00
|
|
|
zend_resource_dtor(res);
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
2014-08-28 00:49:56 +08:00
|
|
|
efree_size(res, sizeof(zend_resource));
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
2014-02-10 14:04:30 +08:00
|
|
|
void plist_entry_destructor(zval *zv)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2014-02-10 14:04:30 +08:00
|
|
|
zend_resource *res = Z_RES_P(zv);
|
1999-04-08 02:10:10 +08:00
|
|
|
|
2014-04-11 06:21:06 +08:00
|
|
|
if (res->type >= 0) {
|
2014-04-11 18:47:38 +08:00
|
|
|
zend_rsrc_list_dtors_entry *ld;
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2014-04-11 18:47:38 +08:00
|
|
|
ld = zend_hash_index_find_ptr(&list_destructors, res->type);
|
2020-09-21 20:58:23 +08:00
|
|
|
ZEND_ASSERT(ld && "Unknown list entry type");
|
|
|
|
|
|
|
|
if (ld->plist_dtor_ex) {
|
|
|
|
ld->plist_dtor_ex(res);
|
2014-04-11 18:47:38 +08:00
|
|
|
}
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
2014-02-17 21:59:18 +08:00
|
|
|
free(res);
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
ZEND_API void zend_init_rsrc_list(void)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2014-04-21 22:25:34 +08:00
|
|
|
zend_hash_init(&EG(regular_list), 8, NULL, list_entry_destructor, 0);
|
2019-02-12 17:28:23 +08:00
|
|
|
EG(regular_list).nNextFreeElement = 0;
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
void zend_init_rsrc_plist(void)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2020-08-26 18:57:24 +08:00
|
|
|
zend_hash_init(&EG(persistent_list), 8, NULL, plist_entry_destructor, 1);
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
void zend_close_rsrc_list(HashTable *ht)
|
2014-04-11 06:21:06 +08:00
|
|
|
{
|
2021-08-20 21:37:46 +08:00
|
|
|
/* Reload ht->arData on each iteration, as it may be reallocated. */
|
|
|
|
uint32_t i = ht->nNumUsed;
|
|
|
|
while (i-- > 0) {
|
|
|
|
Bucket *p = &ht->arData[i];
|
|
|
|
if (Z_TYPE(p->val) != IS_UNDEF) {
|
|
|
|
zend_resource *res = Z_PTR(p->val);
|
|
|
|
if (res->type >= 0) {
|
|
|
|
zend_resource_dtor(res);
|
|
|
|
}
|
2018-12-19 07:49:56 +08:00
|
|
|
}
|
2021-08-20 21:37:46 +08:00
|
|
|
}
|
2014-04-11 06:21:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
void zend_destroy_rsrc_list(HashTable *ht)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2002-04-20 00:53:36 +08:00
|
|
|
zend_hash_graceful_reverse_destroy(ht);
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
/* int return due to HashTable API */
|
2014-12-14 06:06:14 +08:00
|
|
|
static int clean_module_resource(zval *zv, void *arg)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2014-05-26 11:05:04 +08:00
|
|
|
int resource_id = *(int *)arg;
|
2018-08-19 12:32:00 +08:00
|
|
|
|
|
|
|
return Z_RES_TYPE_P(zv) == resource_id;
|
1999-04-08 02:10:10 +08:00
|
|
|
}
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
/* int return due to HashTable API */
|
2014-12-14 06:06:14 +08:00
|
|
|
static int zend_clean_module_rsrc_dtors_cb(zval *zv, void *arg)
|
1999-04-08 02:10:10 +08:00
|
|
|
{
|
2015-01-03 17:22:58 +08:00
|
|
|
zend_rsrc_list_dtors_entry *ld = (zend_rsrc_list_dtors_entry *)Z_PTR_P(zv);
|
2014-05-26 11:05:04 +08:00
|
|
|
int module_number = *(int *)arg;
|
|
|
|
if (ld->module_number == module_number) {
|
2014-12-14 06:06:14 +08:00
|
|
|
zend_hash_apply_with_argument(&EG(persistent_list), clean_module_resource, (void *) &(ld->resource_id));
|
1999-04-08 02:10:10 +08:00
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
void zend_clean_module_rsrc_dtors(int module_number)
|
2000-04-15 21:02:22 +08:00
|
|
|
{
|
2014-12-14 06:06:14 +08:00
|
|
|
zend_hash_apply_with_argument(&list_destructors, zend_clean_module_rsrc_dtors_cb, (void *) &module_number);
|
2000-04-15 21:02:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-10-15 05:33:10 +08:00
|
|
|
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, const char *type_name, int module_number)
|
2000-04-15 21:02:22 +08:00
|
|
|
{
|
2014-02-10 14:04:30 +08:00
|
|
|
zend_rsrc_list_dtors_entry *lde;
|
|
|
|
zval zv;
|
2015-01-03 17:22:58 +08:00
|
|
|
|
|
|
|
lde = malloc(sizeof(zend_rsrc_list_dtors_entry));
|
2014-02-10 14:04:30 +08:00
|
|
|
lde->list_dtor_ex = ld;
|
|
|
|
lde->plist_dtor_ex = pld;
|
|
|
|
lde->module_number = module_number;
|
|
|
|
lde->resource_id = list_destructors.nNextFreeElement;
|
|
|
|
lde->type_name = type_name;
|
|
|
|
ZVAL_PTR(&zv, lde);
|
2015-01-03 17:22:58 +08:00
|
|
|
|
2014-02-10 14:04:30 +08:00
|
|
|
if (zend_hash_next_index_insert(&list_destructors, &zv) == NULL) {
|
2000-04-15 21:02:22 +08:00
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
return list_destructors.nNextFreeElement-1;
|
|
|
|
}
|
|
|
|
|
2014-02-10 14:04:30 +08:00
|
|
|
ZEND_API int zend_fetch_list_dtor_id(const char *type_name)
|
2001-05-21 01:06:39 +08:00
|
|
|
{
|
|
|
|
zend_rsrc_list_dtors_entry *lde;
|
|
|
|
|
2014-04-18 23:18:11 +08:00
|
|
|
ZEND_HASH_FOREACH_PTR(&list_destructors, lde) {
|
2004-02-18 06:04:05 +08:00
|
|
|
if (lde->type_name && (strcmp(type_name, lde->type_name) == 0)) {
|
2001-05-21 01:06:39 +08:00
|
|
|
return lde->resource_id;
|
|
|
|
}
|
2014-04-18 23:18:11 +08:00
|
|
|
} ZEND_HASH_FOREACH_END();
|
2001-05-21 01:06:39 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2000-04-15 21:02:22 +08:00
|
|
|
|
2014-02-17 21:59:18 +08:00
|
|
|
static void list_destructors_dtor(zval *zv)
|
|
|
|
{
|
|
|
|
free(Z_PTR_P(zv));
|
|
|
|
}
|
|
|
|
|
2020-08-28 21:41:27 +08:00
|
|
|
void zend_init_rsrc_list_dtors(void)
|
2000-04-15 21:02:22 +08:00
|
|
|
{
|
2014-04-21 22:25:34 +08:00
|
|
|
zend_hash_init(&list_destructors, 64, NULL, list_destructors_dtor, 1);
|
2001-05-21 00:04:22 +08:00
|
|
|
list_destructors.nNextFreeElement=1; /* we don't want resource type 0 */
|
2000-04-15 21:02:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-01-24 01:55:17 +08:00
|
|
|
void zend_destroy_rsrc_list_dtors(void)
|
2000-04-15 21:02:22 +08:00
|
|
|
{
|
|
|
|
zend_hash_destroy(&list_destructors);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-14 06:06:14 +08:00
|
|
|
const char *zend_rsrc_list_get_rsrc_type(zend_resource *res)
|
2000-07-15 04:00:24 +08:00
|
|
|
{
|
|
|
|
zend_rsrc_list_dtors_entry *lde;
|
2000-10-21 02:26:15 +08:00
|
|
|
|
2014-02-10 14:04:30 +08:00
|
|
|
lde = zend_hash_index_find_ptr(&list_destructors, res->type);
|
|
|
|
if (lde) {
|
2000-07-15 04:00:24 +08:00
|
|
|
return lde->type_name;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-01 20:19:31 +08:00
|
|
|
ZEND_API zend_resource* zend_register_persistent_resource_ex(zend_string *key, void *rsrc_pointer, int rsrc_type)
|
|
|
|
{
|
|
|
|
zval *zv;
|
|
|
|
zval tmp;
|
|
|
|
|
|
|
|
ZVAL_NEW_PERSISTENT_RES(&tmp, -1, rsrc_pointer, rsrc_type);
|
|
|
|
GC_MAKE_PERSISTENT_LOCAL(Z_COUNTED(tmp));
|
|
|
|
GC_MAKE_PERSISTENT_LOCAL(key);
|
|
|
|
|
|
|
|
zv = zend_hash_update(&EG(persistent_list), key, &tmp);
|
|
|
|
|
|
|
|
return Z_RES_P(zv);
|
|
|
|
}
|
|
|
|
|
|
|
|
ZEND_API zend_resource* zend_register_persistent_resource(const char *key, size_t key_len, void *rsrc_pointer, int rsrc_type)
|
|
|
|
{
|
|
|
|
zend_string *str = zend_string_init(key, key_len, 1);
|
|
|
|
zend_resource *ret = zend_register_persistent_resource_ex(str, rsrc_pointer, rsrc_type);
|
|
|
|
|
2018-05-28 21:27:12 +08:00
|
|
|
zend_string_release_ex(str, 1);
|
2017-11-01 20:19:31 +08:00
|
|
|
return ret;
|
|
|
|
}
|