X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqcur.c;h=19c31a958b59451e981fe00d22d9b767c80a8160;hb=19011ee23e5bdb9a46778e190a61e4ce6c765be7;hp=1cb5d584fc0dbf68a36d9a6857f615825c3474cd;hpb=9255d2d54bca41644cf3588e4e4259a1855b58d7;p=m6w6%2Fext-pq diff --git a/src/php_pqcur.c b/src/php_pqcur.c index 1cb5d58..19c31a9 100644 --- a/src/php_pqcur.c +++ b/src/php_pqcur.c @@ -82,7 +82,7 @@ static void cur_fetch_or_move(INTERNAL_FUNCTION_PARAMETERS, const char *action, } else if (obj->intern->conn->intern->unbuffered && !PQsetSingleRowMode(obj->intern->conn->intern->conn)) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to enable unbuffered mode (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { - php_pq_callback_recurse(&obj->intern->conn->intern->onevent, &resolver); + php_pq_callback_recurse(&obj->intern->conn->intern->onevent, &resolver TSRMLS_CC); obj->intern->conn->intern->poller = PQconsumeInput; } } else { @@ -108,8 +108,8 @@ static void php_pqcur_object_free(void *o TSRMLS_DC) fprintf(stderr, "FREE cur(#%d) %p (conn: %p)\n", obj->zv.handle, obj, obj->intern->conn); #endif if (obj->intern) { - //cur_close(obj TSRMLS_CC); - //php_pq_object_delref(obj->intern->conn TSRMLS_CC); + cur_close(obj TSRMLS_CC); + php_pq_object_delref(obj->intern->conn TSRMLS_CC); efree(obj->intern->decl); efree(obj->intern->name); efree(obj->intern); @@ -176,9 +176,9 @@ static PHP_METHOD(pqcur, open) php_pqcur_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); if (!obj->intern) { - throw_exce(EX_UNINITIALIZED, "pq\\Cursor not initialized"); + throw_exce(EX_UNINITIALIZED TSRMLS_CC, "pq\\Cursor not initialized"); } else if (!obj->intern->open) { - if (SUCCESS == php_pqconn_declare(NULL, obj->intern->conn, obj->intern->decl)) { + if (SUCCESS == php_pqconn_declare(NULL, obj->intern->conn, obj->intern->decl TSRMLS_CC)) { obj->intern->open = 1; } } @@ -200,7 +200,7 @@ static PHP_METHOD(pqcur, close) php_pqcur_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); if (!obj->intern) { - throw_exce(EX_UNINITIALIZED, "pq\\Cursor not initialized"); + throw_exce(EX_UNINITIALIZED TSRMLS_CC, "pq\\Cursor not initialized"); } else { cur_close(obj TSRMLS_CC); }