/* Support functions for general registry objects.
- Copyright (C) 2011-2014 Free Software Foundation, Inc.
+ Copyright (C) 2011-2022 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "registry.h"
-#include "gdb_assert.h"
-#include <string.h>
-
const struct registry_data *
register_data_with_cleanup (struct registry_data_registry *registry,
registry_data_callback save,
{
gdb_assert (fields->data == NULL);
fields->num_data = registry->num_registrations;
- fields->data = XCALLOC (fields->num_data, void *);
+ fields->data = XCNEWVEC (void *, fields->num_data);
}
void