mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00:00
86e511fafb
While __attribute((sentinel)) (exposed by glib under G_GNUC_NULL_TERMINATED macro) is a gcc extension, it's supported by clang too. It's already being used throughout our code but some functions that take variadic arguments and expect NULL at the end were lacking such annotation. Fill them in. After this, there are still some functions left untouched because they expect a different sentinel than NULL. Unfortunately, glib does not provide macro for different sentinels. We may come up with our own, but let's save that for future work. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
/*
|
|
* testutilsqemuschema.h: helper functions for QEMU QAPI schema testing
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "virhash.h"
|
|
#include "virjson.h"
|
|
#include "virbuffer.h"
|
|
|
|
int
|
|
testQEMUSchemaValidate(virJSONValue *obj,
|
|
virJSONValue *root,
|
|
GHashTable *schema,
|
|
bool allowDeprecated,
|
|
virBuffer *debug);
|
|
|
|
int
|
|
testQEMUSchemaValidateCommand(const char *command,
|
|
virJSONValue *arguments,
|
|
GHashTable *schema,
|
|
bool allowDeprecated,
|
|
bool allowRemoved,
|
|
bool allowIncomplete,
|
|
virBuffer *debug);
|
|
|
|
int
|
|
testQEMUSchemaEntryMatchTemplate(virJSONValue *schemaentry,
|
|
...)
|
|
G_GNUC_NULL_TERMINATED;
|
|
|
|
|
|
virJSONValue *
|
|
testQEMUSchemaGetLatest(const char* arch);
|
|
|
|
GHashTable *
|
|
testQEMUSchemaLoadLatest(const char *arch);
|
|
|
|
GHashTable *
|
|
testQEMUSchemaLoad(const char *filename);
|