/* automatically generated by pepy 8.0 #1 (big-screw), do not edit! */

#include "psap.h"

#define	advise	PY_advise

void	advise ();

/* Generated from module UNIV */

#include <stdio.h>
#include "UNIV-types.h"

#ifndef PEPYPARM
#define PEPYPARM char *
#endif /* PEPYPARM */
extern PEPYPARM NullParm;
# line 289 "UNIV-types.py"


free_UNIV_EXTERNAL (arg)
struct type_UNIV_EXTERNAL *arg;
{
    struct type_UNIV_EXTERNAL *parm = arg;

    if (parm == NULL)
	return;

    if (parm -> direct__reference)
        oid_free (parm -> direct__reference),
            parm -> direct__reference = NULLOID;
    if (parm -> data__value__descriptor)
        free_UNIV_ObjectDescriptor (parm -> data__value__descriptor),
            parm -> data__value__descriptor = NULL;
    if (parm -> encoding) {
        struct choice_UNIV_0 *choice_UNIV_0 = parm -> encoding;

        switch (choice_UNIV_0 -> offset) {
            case choice_UNIV_0_single__ASN1__type:
                if (choice_UNIV_0 -> un.single__ASN1__type)
                    pe_free (choice_UNIV_0 -> un.single__ASN1__type),
                        choice_UNIV_0 -> un.single__ASN1__type = NULLPE;
                break;

            case choice_UNIV_0_octet__aligned:
                if (choice_UNIV_0 -> un.octet__aligned)
                    qb_free (choice_UNIV_0 -> un.octet__aligned),
                        choice_UNIV_0 -> un.octet__aligned = NULL;
                break;

            case choice_UNIV_0_arbitrary:
                if (choice_UNIV_0 -> un.arbitrary)
                    pe_free (choice_UNIV_0 -> un.arbitrary),
                        choice_UNIV_0 -> un.arbitrary = NULLPE;
                break;
        }

        if (parm -> encoding)
            free ((char *) parm -> encoding);
        parm -> encoding = NULL;
    }

    free ((char *) arg);
}

