/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>
#include <inttypes.h>
#include <pthread.h>
#include "adr.h"
#include "adr_object.h"
void
{
for (int i = 0; i < o->ao_nparents; i++) {
adr_object_t *p = o->ao_parents[i];
if (p != NULL)
adr_free(p);
}
free(o->ao_parents);
for (int i = 0; i < o->ao_nattributes; i++) {
adr_attribute_t *a = o->ao_attributes[i];
if (a != NULL) {
adr_type_free(a->aa_type);
free(a);
}
}
free(o->ao_attributes);
for (int i = 0; i < o->ao_nmethods; i++) {
adr_method_t *m = o->ao_methods[i];
if (m != NULL) {
adr_type_free(m->am_result);
adr_type_free(m->am_error);
for (int j = 0; j < m->am_nargs; j++) {
adr_parameter_t *p = &m->am_args[j];
adr_type_free(p->ap_type);
}
free(m);
}
}
free(o->ao_methods);
for (int i = 0; i < o->ao_nevents; i++) {
adr_event_t *e = &o->ao_events[i];
adr_type_free(e->ae_type);
}
free(o);
}
int
{
for (int i = 0; i < o->ao_nattributes; i++)
return (i);
return (-1);
}
{
}
{
}
int
{
for (int i = 0; i < o->ao_nmethods; i++)
return (i);
return (-1);
}
{
}
{
}
int
{
for (int i = 0; i < o->ao_nevents; i++)
return (i);
return (-1);
}
{
}
{
}