smart_str_appendl(&cmd, opt_str, opt_len);
smart_str_0(&cmd);
- res = PQexec(conn_obj->intern->conn, smart_str_v(&cmd));
+ res = php_pq_exec(conn_obj->intern->conn, smart_str_v(&cmd));
if (!res) {
throw_exce(EX_RUNTIME, "Failed to start %s (%s)", smart_str_v(&cmd), PHP_PQerrorMessage(obj->intern->conn->intern->conn));
php_pq_object_addref(conn_obj);
}
- PHP_PQclear(res);
+ php_pqres_clear(res);
}
smart_str_free(&cmd);
throw_exce(EX_RUNTIME, "Failed to fetch COPY result (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn));
} else {
php_pqres_success(res);
- PHP_PQclear(res);
+ php_pqres_clear(res);
}
}
ZEND_RESULT_CODE rv;
zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh);
- rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &zdata);
+ rv = zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zdata);
zend_restore_error_handling(&zeh);
if (SUCCESS == rv) {
throw_exce(EX_RUNTIME, "Failed to fetch COPY result (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn));
} else {
php_pqres_success(res);
- PHP_PQclear(res);
+ php_pqres_clear(res);
RETVAL_FALSE;
}
break;
}
static zend_function_entry php_pqcopy_methods[] = {
- PHP_ME(pqcopy, __construct, ai_pqcopy_construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+ PHP_ME(pqcopy, __construct, ai_pqcopy_construct, ZEND_ACC_PUBLIC)
PHP_ME(pqcopy, put, ai_pqcopy_put, ZEND_ACC_PUBLIC)
PHP_ME(pqcopy, end, ai_pqcopy_end, ZEND_ACC_PUBLIC)
PHP_ME(pqcopy, get, ai_pqcopy_get, ZEND_ACC_PUBLIC)
php_pqcopy_object_handlers.read_property = php_pq_object_read_prop;
php_pqcopy_object_handlers.write_property = php_pq_object_write_prop;
php_pqcopy_object_handlers.clone_obj = NULL;
- php_pqcopy_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqcopy_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqcopy_object_handlers.get_gc = php_pq_object_get_gc;
php_pqcopy_object_handlers.get_properties = php_pq_object_properties;
php_pqcopy_object_handlers.get_debug_info = php_pq_object_debug_info;