mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 15:12:07 -06:00
qerror: reduce public exposure
qerror will be dropped in a near future, let's reduce its public exposure by making functions only used in qerror.c static. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
b5d90f0424
commit
2a74440547
2 changed files with 5 additions and 10 deletions
10
qerror.c
10
qerror.c
|
@ -336,7 +336,7 @@ static const QErrorStringTable qerror_table[] = {
|
||||||
*
|
*
|
||||||
* Return strong reference.
|
* Return strong reference.
|
||||||
*/
|
*/
|
||||||
QError *qerror_new(void)
|
static QError *qerror_new(void)
|
||||||
{
|
{
|
||||||
QError *qerr;
|
QError *qerr;
|
||||||
|
|
||||||
|
@ -424,8 +424,8 @@ static void qerror_set_desc(QError *qerr, const char *fmt)
|
||||||
*
|
*
|
||||||
* Return strong reference.
|
* Return strong reference.
|
||||||
*/
|
*/
|
||||||
QError *qerror_from_info(const char *file, int linenr, const char *func,
|
static QError *qerror_from_info(const char *file, int linenr, const char *func,
|
||||||
const char *fmt, va_list *va)
|
const char *fmt, va_list *va)
|
||||||
{
|
{
|
||||||
QError *qerr;
|
QError *qerr;
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ QString *qerror_human(const QError *qerror)
|
||||||
* it uses error_report() for this, so that the output is routed to the right
|
* it uses error_report() for this, so that the output is routed to the right
|
||||||
* place (ie. stderr or Monitor's device).
|
* place (ie. stderr or Monitor's device).
|
||||||
*/
|
*/
|
||||||
void qerror_print(QError *qerror)
|
static void qerror_print(QError *qerror)
|
||||||
{
|
{
|
||||||
QString *qstring = qerror_human(qerror);
|
QString *qstring = qerror_human(qerror);
|
||||||
loc_push_restore(&qerror->loc);
|
loc_push_restore(&qerror->loc);
|
||||||
|
@ -620,7 +620,7 @@ void assert_no_error(Error *err)
|
||||||
/**
|
/**
|
||||||
* qobject_to_qerror(): Convert a QObject into a QError
|
* qobject_to_qerror(): Convert a QObject into a QError
|
||||||
*/
|
*/
|
||||||
QError *qobject_to_qerror(const QObject *obj)
|
static QError *qobject_to_qerror(const QObject *obj)
|
||||||
{
|
{
|
||||||
if (qobject_type(obj) != QTYPE_QERROR) {
|
if (qobject_type(obj) != QTYPE_QERROR) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
5
qerror.h
5
qerror.h
|
@ -33,11 +33,7 @@ typedef struct QError {
|
||||||
const QErrorStringTable *entry;
|
const QErrorStringTable *entry;
|
||||||
} QError;
|
} QError;
|
||||||
|
|
||||||
QError *qerror_new(void);
|
|
||||||
QError *qerror_from_info(const char *file, int linenr, const char *func,
|
|
||||||
const char *fmt, va_list *va) GCC_FMT_ATTR(4, 0);
|
|
||||||
QString *qerror_human(const QError *qerror);
|
QString *qerror_human(const QError *qerror);
|
||||||
void qerror_print(QError *qerror);
|
|
||||||
void qerror_report_internal(const char *file, int linenr, const char *func,
|
void qerror_report_internal(const char *file, int linenr, const char *func,
|
||||||
const char *fmt, ...) GCC_FMT_ATTR(4, 5);
|
const char *fmt, ...) GCC_FMT_ATTR(4, 5);
|
||||||
void qerror_report_err(Error *err);
|
void qerror_report_err(Error *err);
|
||||||
|
@ -45,7 +41,6 @@ void assert_no_error(Error *err);
|
||||||
QString *qerror_format(const char *fmt, QDict *error);
|
QString *qerror_format(const char *fmt, QDict *error);
|
||||||
#define qerror_report(fmt, ...) \
|
#define qerror_report(fmt, ...) \
|
||||||
qerror_report_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
|
qerror_report_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
|
||||||
QError *qobject_to_qerror(const QObject *obj);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QError class list
|
* QError class list
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue