/* Generated by G-Wrap: an experimental C->Guile wrapper engine */

#define _GNU_SOURCE
#include <guile/gh.h>
#include <libguile.h>
#include <string.h>
#include <g-wrap-compatibility.h>

#include "gw-test-glib.h"
#include <glib.h>
#include <g-wrap-glib.h>
#include <g-wrap-wct.h>
#include <limits.h>
#include <glib.h>
#include "g-wrap-test-c-code.h"
#include <g-wrap-wct.h>
static SCM gw__tmp0_range_minval_gw_int_;
static SCM gw__tmp1_range_maxval_gw_int_;
static SCM gw__tmp15_wct_info_for__gw_TestIntCarrier__ = SCM_BOOL_F;
enum GW__ErrorStatus
{
  GW__ERR_NONE,
  GW__ERR_MISC,
  GW__ERR_MEMORY,
  GW__ERR_RANGE,
  GW__ERR_TYPE,
  GW__ERR_ARGC,
  GW__ERR_ARG_RANGE,
  GW__ERR_ARG_TYPE
};
 
static void
gw__handle_wrapper_error(enum GW__ErrorStatus status,
                         const char *func_name,
                         unsigned int arg_pos,
                         const char *misc_msg,
                         SCM scm_data) __attribute__ ((noreturn));

static void
gw__handle_wrapper_error(enum GW__ErrorStatus status,
                         const char *func_name,
                         unsigned int arg_pos,
                         const char *misc_msg,
                         SCM scm_data)
{
  static SCM out_of_range_key = SCM_BOOL_F;
  static SCM wrong_type_key = SCM_BOOL_F;

  if(SCM_FALSEP(out_of_range_key))
    out_of_range_key = scm_permanent_object(scm_c_make_keyword("out-of-range"));
  if(SCM_FALSEP(wrong_type_key))
    wrong_type_key = scm_permanent_object(scm_c_make_keyword("wrong-type"));

  switch(status) {
  case GW__ERR_NONE:
    scm_misc_error(func_name,
                   "asked to handle error when there wasn't one",
                   SCM_EOL);
    break;
  case GW__ERR_MISC:
    /* scm_data is a list of format args for misc_msg */
    scm_misc_error(func_name, misc_msg, scm_data); break;
  case GW__ERR_MEMORY:
    scm_memory_error(func_name); break;
  case GW__ERR_RANGE:
    scm_error (out_of_range_key,
	       func_name,
	       "Out of range: ~S",
               scm_cons (scm_data, SCM_EOL),
	       SCM_BOOL_F);
    break;
  case GW__ERR_TYPE:
    scm_error(wrong_type_key,
              func_name,
              "Wrong type: ",
              scm_cons (scm_data, SCM_EOL),
              SCM_BOOL_F);
    break;
  case GW__ERR_ARGC:
    scm_wrong_num_args(scm_makfrom0str(func_name)); break;
  case GW__ERR_ARG_RANGE:
    /* scm_data is the bad arg */
    scm_out_of_range(func_name, scm_data); break;
  case GW__ERR_ARG_TYPE:
    /* scm_data is the bad arg */
    scm_wrong_type_arg(func_name, arg_pos, scm_data); break;
  default:
    scm_misc_error(func_name,
                   "asked to handle nonexistent gw:error type: ~S",
                   scm_cons(scm_long2num(status), SCM_EOL));    
    break;
  };
  exit(1);
}
static char * gw__tmp17_gw_test_gw_glib_echo_gint64_namestr = "gw-test-gw-glib-echo-gint64";
static SCM gw__tmp16_gw_test_gw_glib_echo_gint64_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
gint64 gw__c_result;

gint64 gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if (!(gw_glib_gint64_p(gw__scm_arg0))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else {gw__c_arg0 = gw_glib_scm_to_gint64(gw__scm_arg0);
}if ((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if ((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_gint64 (gw__c_arg0);
SCM_ALLOW_INTS;
{
gw__scm_result = gw_glib_gint64_to_scm(gw__c_result);
}
}
  gw__post_call_arg_0:
  /* no post-call arg code requested! */
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp17_gw_test_gw_glib_echo_gint64_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp19_gw_test_gw_standard_echo_gchars_caller_owned_namestr = "gw-test-gw-standard-echo-gchars-caller-owned";
static SCM gw__tmp18_gw_test_gw_standard_echo_gchars_caller_owned_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
gchar * gw__c_result;

gchar * gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(SCM_FALSEP(gw__scm_arg0))
  gw__c_arg0 = NULL;
else if(SCM_STRINGP(gw__scm_arg0))
{
   char *gw__tmp44_cstr = gh_scm2newstr(gw__scm_arg0, NULL);
  gw__c_arg0 = g_strdup(gw__tmp44_cstr);
  free(gw__tmp44_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_standard_echo_gchars_caller_owned (gw__c_arg0);
SCM_ALLOW_INTS;
{
  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__c_result == NULL) gw__scm_result = SCM_BOOL_F;
else
gw__scm_result = gh_str02scm((char *) gw__c_result);
if(gw__c_result) g_free((void *) gw__c_result);
}
}
  gw__post_call_arg_0:
{
if(gw__c_arg0) g_free((void *) gw__c_arg0);
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp19_gw_test_gw_standard_echo_gchars_caller_owned_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp21_gw_test_gw_standard_echo_const_gchars_caller_owned_namestr = "gw-test-gw-standard-echo-const-gchars-caller-owned";
static SCM gw__tmp20_gw_test_gw_standard_echo_const_gchars_caller_owned_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
const gchar * gw__c_result;

const gchar * gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(SCM_FALSEP(gw__scm_arg0))
  gw__c_arg0 = NULL;
else if(SCM_STRINGP(gw__scm_arg0))
{
   char *gw__tmp45_cstr = gh_scm2newstr(gw__scm_arg0, NULL);
  gw__c_arg0 = g_strdup(gw__tmp45_cstr);
  free(gw__tmp45_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_standard_echo_const_gchars_caller_owned (gw__c_arg0);
SCM_ALLOW_INTS;
{
  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__c_result == NULL) gw__scm_result = SCM_BOOL_F;
else
gw__scm_result = gh_str02scm((char *) gw__c_result);
if(gw__c_result) g_free((void *) gw__c_result);
}
}
  gw__post_call_arg_0:
{
if(gw__c_arg0) g_free((void *) gw__c_arg0);
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp21_gw_test_gw_standard_echo_const_gchars_caller_owned_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp23_gw_test_gw_standard_echo_gchars_callee_owned_namestr = "gw-test-gw-standard-echo-gchars-callee-owned";
static SCM gw__tmp22_gw_test_gw_standard_echo_gchars_callee_owned_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
gchar * gw__c_result;

gchar * gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(SCM_FALSEP(gw__scm_arg0))
  gw__c_arg0 = NULL;
else if(SCM_STRINGP(gw__scm_arg0))
{
   char *gw__tmp46_cstr = gh_scm2newstr(gw__scm_arg0, NULL);
  gw__c_arg0 = g_strdup(gw__tmp46_cstr);
  free(gw__tmp46_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_standard_echo_gchars_callee_owned (gw__c_arg0);
SCM_ALLOW_INTS;
{
  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__c_result == NULL) gw__scm_result = SCM_BOOL_F;
else
gw__scm_result = gh_str02scm((char *) gw__c_result);
}
}
  gw__post_call_arg_0:
{
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp23_gw_test_gw_standard_echo_gchars_callee_owned_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp25_gw_test_gw_standard_echo_const_gchars_callee_owned_namestr = "gw-test-gw-standard-echo-const-gchars-callee-owned";
static SCM gw__tmp24_gw_test_gw_standard_echo_const_gchars_callee_owned_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
const gchar * gw__c_result;

const gchar * gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(SCM_FALSEP(gw__scm_arg0))
  gw__c_arg0 = NULL;
else if(SCM_STRINGP(gw__scm_arg0))
{
   char *gw__tmp47_cstr = gh_scm2newstr(gw__scm_arg0, NULL);
  gw__c_arg0 = g_strdup(gw__tmp47_cstr);
  free(gw__tmp47_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_standard_echo_const_gchars_callee_owned (gw__c_arg0);
SCM_ALLOW_INTS;
{
  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__c_result == NULL) gw__scm_result = SCM_BOOL_F;
else
gw__scm_result = gh_str02scm((char *) gw__c_result);
}
}
  gw__post_call_arg_0:
{
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp25_gw_test_gw_standard_echo_const_gchars_callee_owned_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp27_gw_test_make_int_carrier_namestr = "gw-test-make-int-carrier";
static SCM gw__tmp26_gw_test_make_int_carrier_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
gwTestIntCarrier* gw__c_result;

int gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(SCM_FALSEP(scm_integer_p(gw__scm_arg0))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if(SCM_FALSEP(scm_geq_p(gw__scm_arg0, gw__tmp0_range_minval_gw_int_))        || SCM_FALSEP(scm_leq_p(gw__scm_arg0, gw__tmp1_range_maxval_gw_int_))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else {gw__c_arg0= gh_scm2long(gw__scm_arg0);
}

if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_make_int_carrier (gw__c_arg0);
SCM_ALLOW_INTS;
{
if(gw__c_result == NULL) gw__scm_result = SCM_BOOL_F;
else gw__scm_result = gw_wcp_assimilate_ptr((void *) gw__c_result, gw__tmp15_wct_info_for__gw_TestIntCarrier__);
}
}
  gw__post_call_arg_0:
  /* no post-call arg code requested! */
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp27_gw_test_make_int_carrier_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp29_gw_test_destroy_int_carrier_namestr = "gw-test-destroy-int-carrier";
static SCM gw__tmp28_gw_test_destroy_int_carrier_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;

gwTestIntCarrier* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(!(SCM_FALSEP(gw__scm_arg0) || gw_wcp_is_of_type_p(gw__tmp15_wct_info_for__gw_TestIntCarrier__, gw__scm_arg0))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else {if(SCM_FALSEP(gw__scm_arg0)) gw__c_arg0 = NULL;
else gw__c_arg0 = gw_wcp_get_ptr(gw__scm_arg0);
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw_test_destroy_int_carrier (gw__c_arg0);
SCM_ALLOW_INTS;
{
gw__scm_result = SCM_UNSPECIFIED;
}
}
  gw__post_call_arg_0:
  /* no post-call arg code requested! */
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp29_gw_test_destroy_int_carrier_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp31_gw_test_int_carrier_get_value_namestr = "gw-test-int-carrier-get-value";
static SCM gw__tmp30_gw_test_int_carrier_get_value_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
int gw__c_result;

const gwTestIntCarrier* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
if(!(SCM_FALSEP(gw__scm_arg0) || gw_wcp_is_of_type_p(gw__tmp15_wct_info_for__gw_TestIntCarrier__, gw__scm_arg0))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else {if(SCM_FALSEP(gw__scm_arg0)) gw__c_arg0 = NULL;
else gw__c_arg0 = gw_wcp_get_ptr(gw__scm_arg0);
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_int_carrier_get_value (gw__c_arg0);
SCM_ALLOW_INTS;
{
gw__scm_result= gh_long2scm(gw__c_result);
}
}
  gw__post_call_arg_0:
  /* no post-call arg code requested! */
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp31_gw_test_int_carrier_get_value_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp33_gw_test_gw_glib_echo_list_namestr = "gw-test-gw-glib-echo-gchars-list-1";
static SCM gw__tmp32_gw_test_gw_glib_echo_list_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GList* gw__c_result;

GList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp48_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp48_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gchar * gw__tmp49_c_item;
    SCM gw__tmp50_scm_item = SCM_CAR(gw__tmp48_scm_rest);

if(SCM_FALSEP(gw__tmp50_scm_item))
  gw__tmp49_c_item = NULL;
else if(SCM_STRINGP(gw__tmp50_scm_item))
{
   char *gw__tmp52_cstr = gh_scm2newstr(gw__tmp50_scm_item, NULL);
  gw__tmp49_c_item = g_strdup(gw__tmp52_cstr);
  free(gw__tmp52_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp50_scm_item;
   goto gw__post_call_arg_0;
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_list_prepend (gw__c_arg0, (gpointer)gw__tmp49_c_item);
    }
    gw__tmp48_scm_rest = SCM_CDR (gw__tmp48_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_list_reverse(gw__c_arg0);
  }
  else
  {
    GList * gw__tmp51_cursor = gw__c_arg0;
    while(gw__tmp51_cursor)
    {
      gchar * gw__tmp49_c_item;
      gw__tmp49_c_item = ( gchar *) gw__tmp51_cursor->data;
if(gw__tmp49_c_item) g_free((void *) gw__tmp49_c_item);
gw__tmp51_cursor = gw__tmp51_cursor->next;
    }
    g_list_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_list (gw__c_arg0);
SCM_ALLOW_INTS;
{
GList * gw__tmp53_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp53_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gchar * gw__tmp54_c_item;
  SCM gw__tmp55_scm_item;

  gw__tmp54_c_item = ( gchar *) gw__tmp53_c_rest->data;

  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__tmp54_c_item == NULL) gw__tmp55_scm_item = SCM_BOOL_F;
else
gw__tmp55_scm_item = gh_str02scm((char *) gw__tmp54_c_item);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp55_scm_item, gw__scm_result);
  }
  gw__tmp53_c_rest = gw__tmp53_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GList * gw__tmp57_cursor = gw__c_result;
  while(gw__tmp57_cursor)
  {
    gchar * gw__tmp56_c_item;
    gw__tmp56_c_item = ( gchar *) gw__tmp57_cursor->data;
if(gw__tmp56_c_item) g_free((void *) gw__tmp56_c_item);
gw__tmp57_cursor = gw__tmp57_cursor->next;
  }
  if(gw__c_result)
  {
    g_list_free(gw__c_result);
    gw__c_result = NULL;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GList * gw__tmp59_cursor = gw__c_arg0;
  while(gw__tmp59_cursor)
  {
    gchar * gw__tmp58_c_item;
    gw__tmp58_c_item = ( gchar *) gw__tmp59_cursor->data;
gw__tmp59_cursor = gw__tmp59_cursor->next;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp33_gw_test_gw_glib_echo_list_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp35_gw_test_gw_glib_echo_list_namestr = "gw-test-gw-glib-echo-gchars-list-2";
static SCM gw__tmp34_gw_test_gw_glib_echo_list_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GList* gw__c_result;

GList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp60_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp60_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gchar * gw__tmp61_c_item;
    SCM gw__tmp62_scm_item = SCM_CAR(gw__tmp60_scm_rest);

if(SCM_FALSEP(gw__tmp62_scm_item))
  gw__tmp61_c_item = NULL;
else if(SCM_STRINGP(gw__tmp62_scm_item))
{
   char *gw__tmp64_cstr = gh_scm2newstr(gw__tmp62_scm_item, NULL);
  gw__tmp61_c_item = g_strdup(gw__tmp64_cstr);
  free(gw__tmp64_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp62_scm_item;
   goto gw__post_call_arg_0;
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_list_prepend (gw__c_arg0, (gpointer)gw__tmp61_c_item);
    }
    gw__tmp60_scm_rest = SCM_CDR (gw__tmp60_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_list_reverse(gw__c_arg0);
  }
  else
  {
    GList * gw__tmp63_cursor = gw__c_arg0;
    while(gw__tmp63_cursor)
    {
      gchar * gw__tmp61_c_item;
      gw__tmp61_c_item = ( gchar *) gw__tmp63_cursor->data;
if(gw__tmp61_c_item) g_free((void *) gw__tmp61_c_item);
gw__tmp63_cursor = gw__tmp63_cursor->next;
    }
    g_list_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_list (gw__c_arg0);
SCM_ALLOW_INTS;
{
GList * gw__tmp65_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp65_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gchar * gw__tmp66_c_item;
  SCM gw__tmp67_scm_item;

  gw__tmp66_c_item = ( gchar *) gw__tmp65_c_rest->data;

  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__tmp66_c_item == NULL) gw__tmp67_scm_item = SCM_BOOL_F;
else
gw__tmp67_scm_item = gh_str02scm((char *) gw__tmp66_c_item);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp67_scm_item, gw__scm_result);
  }
  gw__tmp65_c_rest = gw__tmp65_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GList * gw__tmp69_cursor = gw__c_result;
  while(gw__tmp69_cursor)
  {
    gchar * gw__tmp68_c_item;
    gw__tmp68_c_item = ( gchar *) gw__tmp69_cursor->data;
gw__tmp69_cursor = gw__tmp69_cursor->next;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GList * gw__tmp71_cursor = gw__c_arg0;
  while(gw__tmp71_cursor)
  {
    gchar * gw__tmp70_c_item;
    gw__tmp70_c_item = ( gchar *) gw__tmp71_cursor->data;
if(gw__tmp70_c_item) g_free((void *) gw__tmp70_c_item);
gw__tmp71_cursor = gw__tmp71_cursor->next;
  }
  if(gw__c_arg0)
  {
    g_list_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp35_gw_test_gw_glib_echo_list_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp37_gw_test_gw_glib_echo_list_namestr = "gw-test-gw-glib-echo-test-foo-list";
static SCM gw__tmp36_gw_test_gw_glib_echo_list_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GList* gw__c_result;

GList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp72_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp72_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gwTestIntCarrier* gw__tmp73_c_item;
    SCM gw__tmp74_scm_item = SCM_CAR(gw__tmp72_scm_rest);

if(!(SCM_FALSEP(gw__tmp74_scm_item) || gw_wcp_is_of_type_p(gw__tmp15_wct_info_for__gw_TestIntCarrier__, gw__tmp74_scm_item))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp74_scm_item;
   goto gw__post_call_arg_0;
}
else {if(SCM_FALSEP(gw__tmp74_scm_item)) gw__tmp73_c_item = NULL;
else gw__tmp73_c_item = gw_wcp_get_ptr(gw__tmp74_scm_item);
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_list_prepend (gw__c_arg0, (gpointer)gw__tmp73_c_item);
    }
    gw__tmp72_scm_rest = SCM_CDR (gw__tmp72_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_list_reverse(gw__c_arg0);
  }
  else
  {
    GList * gw__tmp75_cursor = gw__c_arg0;
    while(gw__tmp75_cursor)
    {
      gwTestIntCarrier* gw__tmp73_c_item;
      gw__tmp73_c_item = ( gwTestIntCarrier*) gw__tmp75_cursor->data;
gw__tmp75_cursor = gw__tmp75_cursor->next;
    }
    g_list_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_list (gw__c_arg0);
SCM_ALLOW_INTS;
{
GList * gw__tmp76_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp76_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gwTestIntCarrier* gw__tmp77_c_item;
  SCM gw__tmp78_scm_item;

  gw__tmp77_c_item = ( gwTestIntCarrier*) gw__tmp76_c_rest->data;

if(gw__tmp77_c_item == NULL) gw__tmp78_scm_item = SCM_BOOL_F;
else gw__tmp78_scm_item = gw_wcp_assimilate_ptr((void *) gw__tmp77_c_item, gw__tmp15_wct_info_for__gw_TestIntCarrier__);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp78_scm_item, gw__scm_result);
  }
  gw__tmp76_c_rest = gw__tmp76_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GList * gw__tmp80_cursor = gw__c_result;
  while(gw__tmp80_cursor)
  {
    gwTestIntCarrier* gw__tmp79_c_item;
    gw__tmp79_c_item = ( gwTestIntCarrier*) gw__tmp80_cursor->data;
gw__tmp80_cursor = gw__tmp80_cursor->next;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GList * gw__tmp82_cursor = gw__c_arg0;
  while(gw__tmp82_cursor)
  {
    gwTestIntCarrier* gw__tmp81_c_item;
    gw__tmp81_c_item = ( gwTestIntCarrier*) gw__tmp82_cursor->data;
gw__tmp82_cursor = gw__tmp82_cursor->next;
  }
  if(gw__c_arg0)
  {
    g_list_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp37_gw_test_gw_glib_echo_list_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp39_gw_test_gw_glib_echo_slist_namestr = "gw-test-gw-glib-echo-gchars-slist-1";
static SCM gw__tmp38_gw_test_gw_glib_echo_slist_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GSList* gw__c_result;

GSList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp83_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp83_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gchar * gw__tmp84_c_item;
    SCM gw__tmp85_scm_item = SCM_CAR(gw__tmp83_scm_rest);

if(SCM_FALSEP(gw__tmp85_scm_item))
  gw__tmp84_c_item = NULL;
else if(SCM_STRINGP(gw__tmp85_scm_item))
{
   char *gw__tmp87_cstr = gh_scm2newstr(gw__tmp85_scm_item, NULL);
  gw__tmp84_c_item = g_strdup(gw__tmp87_cstr);
  free(gw__tmp87_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp85_scm_item;
   goto gw__post_call_arg_0;
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_slist_prepend (gw__c_arg0, (gpointer)gw__tmp84_c_item);
    }
    gw__tmp83_scm_rest = SCM_CDR (gw__tmp83_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_slist_reverse(gw__c_arg0);
  }
  else
  {
    GSList * gw__tmp86_cursor = gw__c_arg0;
    while(gw__tmp86_cursor)
    {
      gchar * gw__tmp84_c_item;
      gw__tmp84_c_item = ( gchar *) gw__tmp86_cursor->data;
if(gw__tmp84_c_item) g_free((void *) gw__tmp84_c_item);
gw__tmp86_cursor = gw__tmp86_cursor->next;
    }
    g_slist_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_slist (gw__c_arg0);
SCM_ALLOW_INTS;
{
GSList * gw__tmp88_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp88_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gchar * gw__tmp89_c_item;
  SCM gw__tmp90_scm_item;

  gw__tmp89_c_item = ( gchar *) gw__tmp88_c_rest->data;

  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__tmp89_c_item == NULL) gw__tmp90_scm_item = SCM_BOOL_F;
else
gw__tmp90_scm_item = gh_str02scm((char *) gw__tmp89_c_item);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp90_scm_item, gw__scm_result);
  }
  gw__tmp88_c_rest = gw__tmp88_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GSList * gw__tmp92_cursor = gw__c_result;
  while(gw__tmp92_cursor)
  {
    gchar * gw__tmp91_c_item;
    gw__tmp91_c_item = ( gchar *) gw__tmp92_cursor->data;
if(gw__tmp91_c_item) g_free((void *) gw__tmp91_c_item);
gw__tmp92_cursor = gw__tmp92_cursor->next;
  }
  if(gw__c_result)
  {
    g_slist_free(gw__c_result);
    gw__c_result = NULL;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GSList * gw__tmp94_cursor = gw__c_arg0;
  while(gw__tmp94_cursor)
  {
    gchar * gw__tmp93_c_item;
    gw__tmp93_c_item = ( gchar *) gw__tmp94_cursor->data;
gw__tmp94_cursor = gw__tmp94_cursor->next;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp39_gw_test_gw_glib_echo_slist_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp41_gw_test_gw_glib_echo_slist_namestr = "gw-test-gw-glib-echo-gchars-slist-2";
static SCM gw__tmp40_gw_test_gw_glib_echo_slist_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GSList* gw__c_result;

GSList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp95_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp95_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gchar * gw__tmp96_c_item;
    SCM gw__tmp97_scm_item = SCM_CAR(gw__tmp95_scm_rest);

if(SCM_FALSEP(gw__tmp97_scm_item))
  gw__tmp96_c_item = NULL;
else if(SCM_STRINGP(gw__tmp97_scm_item))
{
   char *gw__tmp99_cstr = gh_scm2newstr(gw__tmp97_scm_item, NULL);
  gw__tmp96_c_item = g_strdup(gw__tmp99_cstr);
  free(gw__tmp99_cstr);
}
else
{
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp97_scm_item;
   goto gw__post_call_arg_0;
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_slist_prepend (gw__c_arg0, (gpointer)gw__tmp96_c_item);
    }
    gw__tmp95_scm_rest = SCM_CDR (gw__tmp95_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_slist_reverse(gw__c_arg0);
  }
  else
  {
    GSList * gw__tmp98_cursor = gw__c_arg0;
    while(gw__tmp98_cursor)
    {
      gchar * gw__tmp96_c_item;
      gw__tmp96_c_item = ( gchar *) gw__tmp98_cursor->data;
if(gw__tmp96_c_item) g_free((void *) gw__tmp96_c_item);
gw__tmp98_cursor = gw__tmp98_cursor->next;
    }
    g_slist_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_slist (gw__c_arg0);
SCM_ALLOW_INTS;
{
GSList * gw__tmp100_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp100_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gchar * gw__tmp101_c_item;
  SCM gw__tmp102_scm_item;

  gw__tmp101_c_item = ( gchar *) gw__tmp100_c_rest->data;

  /* we coerce to (char *) here b/c broken guile 1.3.4 prototype */
if(gw__tmp101_c_item == NULL) gw__tmp102_scm_item = SCM_BOOL_F;
else
gw__tmp102_scm_item = gh_str02scm((char *) gw__tmp101_c_item);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp102_scm_item, gw__scm_result);
  }
  gw__tmp100_c_rest = gw__tmp100_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GSList * gw__tmp104_cursor = gw__c_result;
  while(gw__tmp104_cursor)
  {
    gchar * gw__tmp103_c_item;
    gw__tmp103_c_item = ( gchar *) gw__tmp104_cursor->data;
gw__tmp104_cursor = gw__tmp104_cursor->next;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GSList * gw__tmp106_cursor = gw__c_arg0;
  while(gw__tmp106_cursor)
  {
    gchar * gw__tmp105_c_item;
    gw__tmp105_c_item = ( gchar *) gw__tmp106_cursor->data;
if(gw__tmp105_c_item) g_free((void *) gw__tmp105_c_item);
gw__tmp106_cursor = gw__tmp106_cursor->next;
  }
  if(gw__c_arg0)
  {
    g_slist_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp41_gw_test_gw_glib_echo_slist_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
static char * gw__tmp43_gw_test_gw_glib_echo_slist_namestr = "gw-test-gw-glib-echo-test-foo-slist";
static SCM gw__tmp42_gw_test_gw_glib_echo_slist_wrapper  (SCM gw__scm_arg0 ) {
  SCM gw__scm_result = SCM_UNSPECIFIED;
  enum GW__ErrorStatus gw__error_status = GW__ERR_NONE;
  SCM gw__error_data = SCM_UNSPECIFIED;
  unsigned int gw__arg_pos = 0;
  const char *gw__error_misc_msg = NULL;
GSList* gw__c_result;

GSList* gw__c_arg0;
/* ARG 0 */
gw__arg_pos++;
if (gw__error_status != GW__ERR_NONE) goto gw__wrapper_exit;

{
{
  SCM gw__tmp107_scm_rest = gw__scm_arg0;
  gw__c_arg0= NULL;
  while(!SCM_NULLP(gw__tmp107_scm_rest)
        && (! (gw__error_status != GW__ERR_NONE)))
  {
    gwTestIntCarrier* gw__tmp108_c_item;
    SCM gw__tmp109_scm_item = SCM_CAR(gw__tmp107_scm_rest);

if(!(SCM_FALSEP(gw__tmp109_scm_item) || gw_wcp_is_of_type_p(gw__tmp15_wct_info_for__gw_TestIntCarrier__, gw__tmp109_scm_item))){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__tmp109_scm_item;
   goto gw__post_call_arg_0;
}
else {if(SCM_FALSEP(gw__tmp109_scm_item)) gw__tmp108_c_item = NULL;
else gw__tmp108_c_item = gw_wcp_get_ptr(gw__tmp109_scm_item);
}

    if(! (gw__error_status != GW__ERR_NONE) )
    {
       gw__c_arg0 = g_slist_prepend (gw__c_arg0, (gpointer)gw__tmp108_c_item);
    }
    gw__tmp107_scm_rest = SCM_CDR (gw__tmp107_scm_rest);
  }
  if(!(gw__error_status != GW__ERR_NONE))
  {
    gw__c_arg0 = g_slist_reverse(gw__c_arg0);
  }
  else
  {
    GSList * gw__tmp110_cursor = gw__c_arg0;
    while(gw__tmp110_cursor)
    {
      gwTestIntCarrier* gw__tmp108_c_item;
      gw__tmp108_c_item = ( gwTestIntCarrier*) gw__tmp110_cursor->data;
gw__tmp110_cursor = gw__tmp110_cursor->next;
    }
    g_slist_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
if((gw__error_status == GW__ERR_TYPE)){
   gw__error_status = GW__ERR_ARG_TYPE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
else if((gw__error_status == GW__ERR_RANGE)){
   gw__error_status = GW__ERR_ARG_RANGE;
    gw__error_data = gw__scm_arg0;
   goto gw__post_call_arg_0;
}
if (gw__error_status == GW__ERR_NONE)
{
  /* no pre-call result code requested! */
if (gw__error_status != GW__ERR_NONE) goto gw__post_call_arg_0;
SCM_DEFER_INTS;
gw__c_result = gw_test_gw_glib_echo_slist (gw__c_arg0);
SCM_ALLOW_INTS;
{
GSList * gw__tmp111_c_rest = gw__c_result;
gw__scm_result= SCM_EOL;
while(gw__tmp111_c_rest && (! (gw__error_status != GW__ERR_NONE)))
{
  gwTestIntCarrier* gw__tmp112_c_item;
  SCM gw__tmp113_scm_item;

  gw__tmp112_c_item = ( gwTestIntCarrier*) gw__tmp111_c_rest->data;

if(gw__tmp112_c_item == NULL) gw__tmp113_scm_item = SCM_BOOL_F;
else gw__tmp113_scm_item = gw_wcp_assimilate_ptr((void *) gw__tmp112_c_item, gw__tmp15_wct_info_for__gw_TestIntCarrier__);

  if(! (gw__error_status != GW__ERR_NONE) )
  {
     gw__scm_result = scm_cons (gw__tmp113_scm_item, gw__scm_result);
  }
  gw__tmp111_c_rest = gw__tmp111_c_rest->next;
}
if(!(gw__error_status != GW__ERR_NONE))
{
  gw__scm_result = scm_reverse(gw__scm_result);
}
{
  GSList * gw__tmp115_cursor = gw__c_result;
  while(gw__tmp115_cursor)
  {
    gwTestIntCarrier* gw__tmp114_c_item;
    gw__tmp114_c_item = ( gwTestIntCarrier*) gw__tmp115_cursor->data;
gw__tmp115_cursor = gw__tmp115_cursor->next;
  }
}
}
}
  gw__post_call_arg_0:
{
{
  GSList * gw__tmp117_cursor = gw__c_arg0;
  while(gw__tmp117_cursor)
  {
    gwTestIntCarrier* gw__tmp116_c_item;
    gw__tmp116_c_item = ( gwTestIntCarrier*) gw__tmp117_cursor->data;
gw__tmp117_cursor = gw__tmp117_cursor->next;
  }
  if(gw__c_arg0)
  {
    g_slist_free(gw__c_arg0);
    gw__c_arg0 = NULL;
  }
}
}
  { /* shut up warnings if no code */ int x = x; }
}
 gw__wrapper_exit:
  if(gw__error_status != GW__ERR_NONE)
    gw__handle_wrapper_error(gw__error_status,
                             gw__tmp43_gw_test_gw_glib_echo_slist_namestr,
                             gw__arg_pos,
                             gw__error_misc_msg,
                             gw__error_data);
  return gw__scm_result;
}
void
gw_init_wrapset_gw_test_glib() {
  static int gw_wrapset_initialized = 0;

  if(!gw_wrapset_initialized)
  {
    gh_eval_str("(use-modules (g-wrap runtime))");
    gh_eval_str("(gw:wrapset-register-runtime \"gw-test-glib\")");

gh_eval_str("(use-modules (g-wrap gw-glib))");
gh_eval_str("(use-modules (g-wrap gw-wct))");
gh_eval_str("(use-modules (g-wrap gw-standard))");
{
   enum GW__ErrorStatus gw__tmp118_status_var = GW__ERR_NONE;
   SCM gw__tmp120_err_data = SCM_UNSPECIFIED;
   char *gw__tmp119_err_misc_msg = NULL;
   (void) gw__tmp118_status_var;
   (void) gw__tmp120_err_data;
   (void) gw__tmp119_err_misc_msg;
}
{
   enum GW__ErrorStatus gw__tmp121_err_status = GW__ERR_NONE;
   SCM gw__tmp123_err_data = SCM_UNSPECIFIED;
   char *gw__tmp122_err_misc_msg = NULL;
   (void) gw__tmp121_err_status;
   (void) gw__tmp123_err_data;
   (void) gw__tmp122_err_misc_msg;
gw__tmp0_range_minval_gw_int_ = scm_long2num(INT_MIN);
scm_protect_object(gw__tmp0_range_minval_gw_int_);
gw__tmp1_range_maxval_gw_int_ = scm_long2num(INT_MAX);
scm_protect_object(gw__tmp1_range_maxval_gw_int_);
if (gw__tmp121_err_status != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp121_err_status,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp122_err_misc_msg,
                            gw__tmp123_err_data);
if (gw__tmp121_err_status != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp121_err_status,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp122_err_misc_msg,
                            gw__tmp123_err_data);
    gw__tmp15_wct_info_for__gw_TestIntCarrier__ = gw_wct_create("<gw:TestIntCarrier*>", NULL, NULL, NULL, NULL);
  gh_define("<gw:TestIntCarrier*>", gw__tmp15_wct_info_for__gw_TestIntCarrier__);
if (gw__tmp121_err_status != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp121_err_status,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp122_err_misc_msg,
                            gw__tmp123_err_data);
}
{
   enum GW__ErrorStatus gw__tmp124_status_var = GW__ERR_NONE;
   SCM gw__tmp126_err_data = SCM_UNSPECIFIED;
   char *gw__tmp125_err_misc_msg = NULL;
   (void) gw__tmp124_status_var;
   (void) gw__tmp126_err_data;
   (void) gw__tmp125_err_misc_msg;
    gh_new_procedure(gw__tmp17_gw_test_gw_glib_echo_gint64_namestr,
                     (SCM (*) ()) gw__tmp16_gw_test_gw_glib_echo_gint64_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp19_gw_test_gw_standard_echo_gchars_caller_owned_namestr,
                     (SCM (*) ()) gw__tmp18_gw_test_gw_standard_echo_gchars_caller_owned_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp21_gw_test_gw_standard_echo_const_gchars_caller_owned_namestr,
                     (SCM (*) ()) gw__tmp20_gw_test_gw_standard_echo_const_gchars_caller_owned_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp23_gw_test_gw_standard_echo_gchars_callee_owned_namestr,
                     (SCM (*) ()) gw__tmp22_gw_test_gw_standard_echo_gchars_callee_owned_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp25_gw_test_gw_standard_echo_const_gchars_callee_owned_namestr,
                     (SCM (*) ()) gw__tmp24_gw_test_gw_standard_echo_const_gchars_callee_owned_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp27_gw_test_make_int_carrier_namestr,
                     (SCM (*) ()) gw__tmp26_gw_test_make_int_carrier_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp29_gw_test_destroy_int_carrier_namestr,
                     (SCM (*) ()) gw__tmp28_gw_test_destroy_int_carrier_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp31_gw_test_int_carrier_get_value_namestr,
                     (SCM (*) ()) gw__tmp30_gw_test_int_carrier_get_value_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp33_gw_test_gw_glib_echo_list_namestr,
                     (SCM (*) ()) gw__tmp32_gw_test_gw_glib_echo_list_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp35_gw_test_gw_glib_echo_list_namestr,
                     (SCM (*) ()) gw__tmp34_gw_test_gw_glib_echo_list_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp37_gw_test_gw_glib_echo_list_namestr,
                     (SCM (*) ()) gw__tmp36_gw_test_gw_glib_echo_list_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp39_gw_test_gw_glib_echo_slist_namestr,
                     (SCM (*) ()) gw__tmp38_gw_test_gw_glib_echo_slist_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp41_gw_test_gw_glib_echo_slist_namestr,
                     (SCM (*) ()) gw__tmp40_gw_test_gw_glib_echo_slist_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
    gh_new_procedure(gw__tmp43_gw_test_gw_glib_echo_slist_namestr,
                     (SCM (*) ()) gw__tmp42_gw_test_gw_glib_echo_slist_wrapper,
                     1,
                     0,
                     0);

if (gw__tmp124_status_var != GW__ERR_NONE)  gw__handle_wrapper_error (gw__tmp124_status_var,
                            "gw_init_wrapset_gw_test_glib",
                            0,
                            gw__tmp125_err_misc_msg,
                            gw__tmp126_err_data);
}
    gw_wrapset_initialized = 1;
    (void) gw__handle_wrapper_error;
  }
}
