packages feed

bindings-libffi (empty) → 0.3

raw patch · 4 files changed

Files

+ LICENSE view
@@ -0,0 +1,29 @@+Copyright (c) <2009>, <Maurício C. Antunes>+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++    * Redistributions of source code must retain the above copyright+    notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above copyright+    notice, this list of conditions and the following disclaimer in the+    documentation and/or other materials provided with the distribution.++    * Neither the name of the author nor the names of contributors+    may be used to endorse or promote products derived from this+    software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,6 @@+#!/usr/bin/env runhaskell++module Main (main) where+import Distribution.Simple++main = defaultMain
+ bindings-libffi.cabal view
@@ -0,0 +1,22 @@+cabal-version: >= 1.2.3+name: bindings-libffi+synopsis:+  Low level bindings to libffi.+version: 0.3+license: BSD3+license-file: LICENSE+maintainer: Maurício C. Antunes+author: Maurício C. Antunes+build-type: Simple+category: FFI+bug-reports: http://bitbucket.org/mauricio/bindings-dsl/issues+library+  hs-source-dirs: src+  extensions:+    ForeignFunctionInterface+  build-depends:+    base >= 3 && <5,+    bindings-DSL >= 1.0.6 && < 1.1+  exposed-modules:+    Bindings.Libffi+  pkgconfig-depends: libffi >= 3.0.9
+ src/Bindings/Libffi.hsc view
@@ -0,0 +1,46 @@+#include <bindings.dsl.h>+#include <ffi.h>++-- | <http://sourceware.org/libffi>.++module Bindings.Libffi where+import Foreign+import Foreign.C++#ccall ffi_prep_cif , Ptr <ffi_cif> -> <ffi_abi> -> \+  CUInt -> Ptr <ffi_type> -> Ptr (Ptr <ffi_type>) -> IO <ffi_status>++#ccall ffi_call , Ptr <ffi_cif> -> FunPtr (IO ()) -> \+  Ptr () -> Ptr (Ptr ()) -> IO ()++#starttype ffi_cif+#stoptype++#integral_t ffi_abi+#integral_t ffi_arg+#integral_t ffi_sarg+#integral_t ffi_status++#opaque_t ffi_type++#num FFI_OK+#num FFI_BAD_TYPEDEF+#num FFI_BAD_ABI+#num FFI_FIRST_ABI+#num FFI_DEFAULT_ABI+#num FFI_LAST_ABI+++#globalvar ffi_type_void , <ffi_type>+#globalvar ffi_type_uint8 , <ffi_type>+#globalvar ffi_type_sint8 , <ffi_type>+#globalvar ffi_type_uint16 , <ffi_type>+#globalvar ffi_type_sint16 , <ffi_type>+#globalvar ffi_type_uint32 , <ffi_type>+#globalvar ffi_type_sint32 , <ffi_type>+#globalvar ffi_type_uint64 , <ffi_type>+#globalvar ffi_type_sint64 , <ffi_type>+#globalvar ffi_type_float , <ffi_type>+#globalvar ffi_type_double , <ffi_type>+#globalvar ffi_type_pointer , <ffi_type>+