{
struct raphf_user *ru = opaque;
- fprintf(stderr, "Freeing raphf_user struct\n");
zend_fcall_info_argn(&ru->data.dtor.fci, 1, &ru->data.data);
zend_fcall_info_call(&ru->data.dtor.fci, &ru->data.dtor.fcc, NULL, NULL);
zend_fcall_info_args_clear(&ru->data.dtor.fci, 1);
if (SUCCESS != php_persistent_handle_provide(name_str, name_len,
&user_ops, ru, raphf_user_dtor)) {
+ RETURN_FALSE;
+ }
+ RETURN_TRUE;
+}
+
+static PHP_FUNCTION(raphf_conceal)
+{
+ zend_string *name;
+
+ if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &name)) {
return;
}
+
+ RETURN_BOOL(FAILURE != zend_hash_del(&PHP_RAPHF_G->persistent_handle.hash, name));
}
static PHP_FUNCTION(raphf_concede)
return;
}
- zend_list_close(Z_RES_P(zrf));
+ RETURN_BOOL(SUCCESS == zend_list_close(Z_RES_P(zrf)));
}
static PHP_FUNCTION(raphf_handle_ctor)
static PHP_MINIT_FUNCTION(raphf_test)
{
+ zend_register_long_constant(ZEND_STRL("RAPHF_TEST"), PHP_RAPHF_TEST, CONST_CS|CONST_PERSISTENT, module_number);
raphf_user_le = zend_register_list_destructors_ex(raphf_user_res_dtor, NULL,
"raphf_user", module_number);
return SUCCESS;