Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > by-pkgid > cb5625aca3e4def202f3617de4d26932 > files > 60

c2hs-0.9.9-2mdk.i586.rpm

/* Auxiliary C code for Ghttp.
 *
 * Copyright (c) 1999 Manuel M. T. Chakravarty
 *
 * This is required due to the inability of GHC's FFI to pass structures from C
 * to Haskell.
 */

#include "ghttpHS.h"

ghttp_current_status *ghttpHS_get_status (ghttp_request *a_request)
{
  ghttp_current_status *status;

  status = (ghttp_current_status *) malloc (sizeof (ghttp_current_status));
  if (!status) {
    printf ("Ghttp: ghttpHS_get_status: Out of memory!");
    exit (1);
  }
  *status = ghttp_get_status (a_request);
  return status;
}