Skip to content

Commit

Permalink
Merge branch 'pull-request/898'
Browse files Browse the repository at this point in the history
* pull-request/898:
  add php_create_socket/php_destroy_socket PHP_SOCKETS_API to abel to create socket ressource in other ext
  • Loading branch information
smalyshev committed Nov 23, 2014
2 parents 07a032e + a0909f0 commit 529e195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ext/sockets/php_sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ struct sockaddr_un {
#endif

PHP_SOCKETS_API int php_sockets_le_socket(void);
PHP_SOCKETS_API php_socket *php_create_socket(void);
PHP_SOCKETS_API void php_destroy_socket(zend_resource *rsrc TSRMLS_DC);

#define php_sockets_le_socket_name "Socket"

Expand Down
4 changes: 2 additions & 2 deletions ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ PHP_SOCKETS_API int php_sockets_le_socket(void) /* {{{ */

/* allocating function to make programming errors due to uninitialized fields
* less likely */
static php_socket *php_create_socket(void) /* {{{ */
PHP_SOCKETS_API php_socket *php_create_socket(void) /* {{{ */
{
php_socket *php_sock = emalloc(sizeof(php_socket));

Expand All @@ -398,7 +398,7 @@ static php_socket *php_create_socket(void) /* {{{ */
}
/* }}} */

static void php_destroy_socket(zend_resource *rsrc TSRMLS_DC) /* {{{ */
PHP_SOCKETS_API void php_destroy_socket(zend_resource *rsrc TSRMLS_DC) /* {{{ */
{
php_socket *php_sock = rsrc->ptr;

Expand Down

0 comments on commit 529e195

Please sign in to comment.