# Path: src/zugbruecke/core/const.py
# _FUNCFLAG_STDCALL = 0 # EXPORT
# 
# FLAG_POINTER = -1
# 
# GROUP_VOID = 1
# 
# GROUP_FUNDAMENTAL = 2
# 
# GROUP_STRUCT = 4
# 
# GROUP_FUNCTION = 8


import ctypes
from ctypes import _FUNCFLAG_CDECL
from ..const import (
	_FUNCFLAG_STDCALL,
	FLAG_POINTER,
	GROUP_VOID,
	GROUP_FUNDAMENTAL,
	GROUP_STRUCT,
	GROUP_FUNCTION
	)

		return self.__unpack_definition_dict__(restype_d)


	def __generate_struct_from_definition__(self, struct_d_dict):

		# Prepare fields
		fields = []

		# Step through fields
		for field in struct_d_dict['_fields_']:

			# Handle fundamental C datatypes (PyCSimpleType)
			if field['g'] == GROUP_FUNDAMENTAL:

				# Add tuple with name and fundamental datatype
				fields.append((
					field['n'],
					self.__unpack_definition_fundamental_dict__(field)
					))

			# Structures (PyCStructType)
			elif field['g'] == GROUP_STRUCT:

				# Add tuple with name and struct datatype
				fields.append((
					field['n'], self.__unpack_definition_struct_dict__(field)
					))

			# Functions (PyCFuncPtrType)

# Path: src/zugbruecke/core/const.py
# _FUNCFLAG_STDCALL = 0 # EXPORT
# 
# FLAG_POINTER = -1
# 
# GROUP_VOID = 1
# 
# GROUP_FUNDAMENTAL = 2
# 
# GROUP_STRUCT = 4
# 
# GROUP_FUNCTION = 8


# Path: src/zugbruecke/core/data/arg_definition.py
import ctypes
from ctypes import _FUNCFLAG_CDECL
from ..const import (
	_FUNCFLAG_STDCALL,
	FLAG_POINTER,
	GROUP_VOID,
	GROUP_FUNDAMENTAL,
	GROUP_STRUCT,
	GROUP_FUNCTION
	)


		return self.__unpack_definition_dict__(restype_d)


	def __generate_struct_from_definition__(self, struct_d_dict):

		# Prepare fields
		fields = []

		# Step through fields
		for field in struct_d_dict['_fields_']:

			# Handle fundamental C datatypes (PyCSimpleType)
			if field['g'] == GROUP_FUNDAMENTAL:

				# Add tuple with name and fundamental datatype
				fields.append((
					field['n'],
					self.__unpack_definition_fundamental_dict__(field)
					))

			# Structures (PyCStructType)
			elif field['g'] == GROUP_STRUCT:

				# Add tuple with name and struct datatype
				fields.append((
					field['n'], self.__unpack_definition_struct_dict__(field)
					))

			# Functions (PyCFuncPtrType)

			elif field['g'] == GROUP_FUNCTION: