/* NodeType.c generated by valac 0.56.19, the Vala compiler
 * generated from NodeType.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* NodeType.vala
 *
 * Copyright (C) 2011-2013  Richard Schwarting <aquarichy@gmail.com>
 * Copyright (C) 2011  Daniel Espinosa <esodan@gmail.com>
 *
 * 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/>.
 *
 * Authors:
 *      Richard Schwarting <aquarichy@gmail.com>
 *      Daniel Espinosa <esodan@gmail.com>
 */
/* TODO: want a method to convert NodeType to a string*/

#include "gxml/gxml.h"
#include <glib.h>
#include <string.h>
#include "gxml.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

/**
 * DOM1 Enumerates possible NodeTypes.
 *
 * For more, see: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-1950641247]]
 */
static GType
gxml_node_type_get_type_once (void)
{
	static const GEnumValue values[] = {{GXML_NODE_TYPE_INVALID, "GXML_NODE_TYPE_INVALID", "invalid"}, {GXML_NODE_TYPE_ELEMENT, "GXML_NODE_TYPE_ELEMENT", "element"}, {GXML_NODE_TYPE_ATTRIBUTE, "GXML_NODE_TYPE_ATTRIBUTE", "attribute"}, {GXML_NODE_TYPE_TEXT, "GXML_NODE_TYPE_TEXT", "text"}, {GXML_NODE_TYPE_CDATA_SECTION, "GXML_NODE_TYPE_CDATA_SECTION", "cdata-section"}, {GXML_NODE_TYPE_ENTITY_REFERENCE, "GXML_NODE_TYPE_ENTITY_REFERENCE", "entity-reference"}, {GXML_NODE_TYPE_ENTITY, "GXML_NODE_TYPE_ENTITY", "entity"}, {GXML_NODE_TYPE_PROCESSING_INSTRUCTION, "GXML_NODE_TYPE_PROCESSING_INSTRUCTION", "processing-instruction"}, {GXML_NODE_TYPE_COMMENT, "GXML_NODE_TYPE_COMMENT", "comment"}, {GXML_NODE_TYPE_DOCUMENT, "GXML_NODE_TYPE_DOCUMENT", "document"}, {GXML_NODE_TYPE_DOCUMENT_TYPE, "GXML_NODE_TYPE_DOCUMENT_TYPE", "document-type"}, {GXML_NODE_TYPE_DOCUMENT_FRAGMENT, "GXML_NODE_TYPE_DOCUMENT_FRAGMENT", "document-fragment"}, {GXML_NODE_TYPE_NOTATION, "GXML_NODE_TYPE_NOTATION", "notation"}, {0, NULL, NULL}};
	GType gxml_node_type_type_id;
	gxml_node_type_type_id = g_enum_register_static ("GXmlNodeType", values);
	return gxml_node_type_type_id;
}

GType
gxml_node_type_get_type (void)
{
	static volatile gsize gxml_node_type_type_id__once = 0;
	if (g_once_init_enter (&gxml_node_type_type_id__once)) {
		GType gxml_node_type_type_id;
		gxml_node_type_type_id = gxml_node_type_get_type_once ();
		g_once_init_leave (&gxml_node_type_type_id__once, gxml_node_type_type_id);
	}
	return gxml_node_type_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

