X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqlob.c;h=5d1f6ba7e00b5328a1504beeb01a7bcae7ce1754;hp=01c0ec2717f273f40240b690d97969704b3cf915;hb=8897b5a581a86279a2ee371784b6b7670c8b8cc1;hpb=1e2615005272bb2347820bccb38c94b9caccafb8 diff --git a/src/php_pqlob.c b/src/php_pqlob.c index 01c0ec2..5d1f6ba 100644 --- a/src/php_pqlob.c +++ b/src/php_pqlob.c @@ -100,7 +100,7 @@ static void php_pqlob_object_read_stream(zval *object, void *o, zval *return_val RETVAL_ZVAL(&zstream, 1, 0); } -static size_t php_pqlob_stream_write(php_stream *stream, const char *buffer, size_t length TSRMLS_DC) +static size_t php_pqlob_stream_write(php_stream *stream, const char *buffer, size_t length) { php_pqlob_object_t *obj = stream->abstract; int written = 0; @@ -109,16 +109,16 @@ static size_t php_pqlob_stream_write(php_stream *stream, const char *buffer, siz written = lo_write(obj->intern->txn->intern->conn->intern->conn, obj->intern->lofd, buffer, length); if (written < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write to LOB with oid=%u (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); + php_error_docref(NULL, E_WARNING, "Failed to write to LOB with oid=%u (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); } - php_pqconn_notify_listeners(obj->intern->txn->intern->conn TSRMLS_CC); + php_pqconn_notify_listeners(obj->intern->txn->intern->conn); } return written; } -static size_t php_pqlob_stream_read(php_stream *stream, char *buffer, size_t length TSRMLS_DC) +static size_t php_pqlob_stream_read(php_stream *stream, char *buffer, size_t length) { php_pqlob_object_t *obj = stream->abstract; int read = 0; @@ -133,27 +133,27 @@ static size_t php_pqlob_stream_read(php_stream *stream, char *buffer, size_t len read = lo_read(obj->intern->txn->intern->conn->intern->conn, obj->intern->lofd, buffer, length); if (read < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read from LOB with oid=%d (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); + php_error_docref(NULL, E_WARNING, "Failed to read from LOB with oid=%d (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); } } - php_pqconn_notify_listeners(obj->intern->txn->intern->conn TSRMLS_CC); + php_pqconn_notify_listeners(obj->intern->txn->intern->conn); } return read; } -static ZEND_RESULT_CODE php_pqlob_stream_close(php_stream *stream, int close_handle TSRMLS_DC) +static ZEND_RESULT_CODE php_pqlob_stream_close(php_stream *stream, int close_handle) { return SUCCESS; } -static int php_pqlob_stream_flush(php_stream *stream TSRMLS_DC) +static int php_pqlob_stream_flush(php_stream *stream) { return SUCCESS; } -static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC) +static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset) { ZEND_RESULT_CODE rv = FAILURE; php_pqlob_object_t *obj = stream->abstract; @@ -162,14 +162,14 @@ static ZEND_RESULT_CODE php_pqlob_stream_seek(php_stream *stream, off_t offset, int position = lo_lseek(obj->intern->txn->intern->conn->intern->conn, obj->intern->lofd, offset, whence); if (position < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek offset in LOB with oid=%d (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); + php_error_docref(NULL, E_WARNING, "Failed to seek offset in LOB with oid=%d (%s)", obj->intern->loid, PHP_PQerrorMessage(obj->intern->txn->intern->conn->intern->conn)); rv = FAILURE; } else { *newoffset = position; rv = SUCCESS; } - php_pqconn_notify_listeners(obj->intern->txn->intern->conn TSRMLS_CC); + php_pqconn_notify_listeners(obj->intern->txn->intern->conn); } return rv; @@ -423,7 +423,7 @@ static PHP_METHOD(pqlob, truncate) { } static zend_function_entry php_pqlob_methods[] = { - PHP_ME(pqlob, __construct, ai_pqlob_construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) + PHP_ME(pqlob, __construct, ai_pqlob_construct, ZEND_ACC_PUBLIC) PHP_ME(pqlob, write, ai_pqlob_write, ZEND_ACC_PUBLIC) PHP_ME(pqlob, read, ai_pqlob_read, ZEND_ACC_PUBLIC) PHP_ME(pqlob, seek, ai_pqlob_seek, ZEND_ACC_PUBLIC)