示例#1
0
static ZEND_RSRC_DTOR_FUNC(php_scws_dtor)
{
	if (rsrc->ptr) 
	{
		struct php_scws *ps = (struct php_scws *) rsrc->ptr;

		scws_free(ps->s);
		DELREF_SCWS(ps->zt);
		efree(ps);
		rsrc->ptr = NULL;
	}
}
示例#2
0
文件: php_scws.c 项目: ivanszl/scws
static ZEND_RSRC_DTOR_FUNC(php_scws_dtor)
{
#if PHP_MAJOR_VERSION == 7
#define rsrc	res
#endif
	if (rsrc->ptr) {
		struct php_scws *ps = (struct php_scws *) rsrc->ptr;
		scws_free(ps->s);
#if PHP_MAJOR_VERSION < 7
		DELREF_SCWS(ps->zt);
#endif
		efree(ps);
		rsrc->ptr = NULL;
	}
#if PHP_MAJOR_VERSION == 7
#undef rsrc
#endif
}