Skip to content

Commit

Permalink
Use swoole_client on php-fpm or mod_php5
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Dec 26, 2013
1 parent 9b1810b commit dde66c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions swoole.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ PHP_MINIT_FUNCTION(swoole)
INIT_CLASS_ENTRY(swoole_lock_ce, "swoole_lock", swoole_lock_methods);
swoole_lock_class_entry_ptr = zend_register_internal_class(&swoole_lock_ce TSRMLS_CC);

//swoole init
swoole_init();

return SUCCESS;
}
/* }}} */
Expand All @@ -265,9 +268,7 @@ PHP_MINIT_FUNCTION(swoole)
*/
PHP_MSHUTDOWN_FUNCTION(swoole)
{
/* uncomment this line if you have INI entries
UNREGISTER_INI_ENTRIES();
*/
swoole_clean();
return SUCCESS;
}
/* }}} */
Expand Down Expand Up @@ -313,8 +314,8 @@ PHP_RINIT_FUNCTION(swoole)
zend_hash_init(&php_sw_reactor_callback, 16, NULL, ZVAL_PTR_DTOR, 0);
//swoole_client::on
zend_hash_init(&php_sw_client_callback, 16, NULL, ZVAL_PTR_DTOR, 0);
//swoole init
swoole_init();
//running
SwooleG.running = 1;
return SUCCESS;
}

Expand All @@ -330,7 +331,6 @@ PHP_RSHUTDOWN_FUNCTION(swoole)
zval_dtor(php_sw_callback[i]);
}
}
swoole_clean();
return SUCCESS;
}

Expand Down

0 comments on commit dde66c7

Please sign in to comment.