From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21340 invoked by alias); 29 Sep 2014 11:16:54 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 21327 invoked by uid 89); 29 Sep 2014 11:16:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com Received: from e06smtp17.uk.ibm.com (HELO e06smtp17.uk.ibm.com) (195.75.94.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 29 Sep 2014 11:16:52 +0000 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Sep 2014 12:16:49 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 29 Sep 2014 12:16:47 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 37CA617D8041 for ; Mon, 29 Sep 2014 12:18:56 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8TBGkh258458266 for ; Mon, 29 Sep 2014 11:16:46 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8TBGkBL015150 for ; Mon, 29 Sep 2014 05:16:46 -0600 Received: from bl3ahm9f.de.ibm.com (dyn-9-152-212-217.boeblingen.de.ibm.com [9.152.212.217]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s8TBGkW2015146 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 29 Sep 2014 05:16:46 -0600 Received: from dvogt by bl3ahm9f.de.ibm.com with local (Exim 4.76) (envelope-from ) id 1XYYwg-0004RA-1b; Mon, 29 Sep 2014 13:16:46 +0200 Date: Mon, 29 Sep 2014 11:16:00 -0000 From: Dominik Vogt To: libffi-discuss@sourceware.org Subject: [PATCH 2/2] Complex type cleanup Message-ID: <20140929111645.GB16165@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com References: <20140929111437.GA16165@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="U+BazGySraz5kW0T" Content-Disposition: inline In-Reply-To: <20140929111437.GA16165@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14092911-0542-0000-0000-000000F749B6 X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00095.txt.bz2 --U+BazGySraz5kW0T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 423 > I have two more small patches for complex type support to make it a > bit easier to use. > The macro FFI_TARGET_HAS_COMPLEX_TYPE is for internal use only. > Once all targets implement complex type support it could be > removed. The second patch renames FFI_TARGET_HAS_COMPLEX_TYPE to _FFI_TARGET_HAS_COMPLEX_TYPE to make the temporary nature of the macro clearer. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany --U+BazGySraz5kW0T Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-Rename-FFI_TARGET_HAS_COMPLEX_TYPE-to-_FFI_TARGET_HA.patch" Content-length: 3333 >From d5d2dc79b6b7282865936425c0755c867dd02e87 Mon Sep 17 00:00:00 2001 From: Dominik Vogt Date: Mon, 29 Sep 2014 11:39:32 +0100 Subject: [PATCH 2/2] Rename FFI_TARGET_HAS_COMPLEX_TYPE to _FFI_TARGET_HAS_COMPLEX_TYPE ... to discourage using it as part of the interface as it is meant as a temporary vehicle until all platforms have complex type support. --- include/ffi.h.in | 4 ++-- src/prep_cif.c | 4 ++-- src/s390/ffitarget.h | 2 +- src/types.c | 2 +- src/x86/ffitarget.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/ffi.h.in b/include/ffi.h.in index 870cfaf..4af6ce0 100644 --- a/include/ffi.h.in +++ b/include/ffi.h.in @@ -200,7 +200,7 @@ FFI_EXTERN ffi_type ffi_type_longdouble; #define ffi_type_longdouble ffi_type_double #endif -#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +#ifdef _FFI_TARGET_HAS_COMPLEX_TYPE FFI_EXTERN ffi_type ffi_type_complex_float; FFI_EXTERN ffi_type ffi_type_complex_double; #if @HAVE_LONG_DOUBLE@ @@ -475,7 +475,7 @@ void ffi_call(ffi_cif *cif, #define FFI_TYPE_SINT64 12 #define FFI_TYPE_STRUCT 13 #define FFI_TYPE_POINTER 14 -#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +#ifdef _FFI_TARGET_HAS_COMPLEX_TYPE #define FFI_TYPE_COMPLEX 15 #endif diff --git a/src/prep_cif.c b/src/prep_cif.c index be5eae3..8af5013 100644 --- a/src/prep_cif.c +++ b/src/prep_cif.c @@ -136,7 +136,7 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi, if ((cif->rtype->size == 0) && (initialize_aggregate(cif->rtype) != FFI_OK)) return FFI_BAD_TYPEDEF; -#ifndef FFI_TARGET_HAS_COMPLEX_TYPE +#ifndef _FFI_TARGET_HAS_COMPLEX_TYPE if (rtype->type == FFI_TYPE_COMPLEX) abort(); #endif @@ -170,7 +170,7 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi, if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK)) return FFI_BAD_TYPEDEF; -#ifndef FFI_TARGET_HAS_COMPLEX_TYPE +#ifndef _FFI_TARGET_HAS_COMPLEX_TYPE if ((*ptr)->type == FFI_TYPE_COMPLEX) abort(); #endif diff --git a/src/s390/ffitarget.h b/src/s390/ffitarget.h index 0e4868a..d42cb21 100644 --- a/src/s390/ffitarget.h +++ b/src/s390/ffitarget.h @@ -53,7 +53,7 @@ typedef enum ffi_abi { #endif #define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION -#define FFI_TARGET_HAS_COMPLEX_TYPE +#define _FFI_TARGET_HAS_COMPLEX_TYPE /* ---- Definitions for closures ----------------------------------------- */ diff --git a/src/types.c b/src/types.c index 7e80aec..ef4f151 100644 --- a/src/types.c +++ b/src/types.c @@ -97,7 +97,7 @@ const ffi_type ffi_type_longdouble = { 16, 16, 4, NULL }; FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE, FFI_LDBL_CONST); #endif -#ifdef FFI_TARGET_HAS_COMPLEX_TYPE +#ifdef _FFI_TARGET_HAS_COMPLEX_TYPE FFI_COMPLEX_TYPEDEF(float, float, const); FFI_COMPLEX_TYPEDEF(double, double, const); #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE diff --git a/src/x86/ffitarget.h b/src/x86/ffitarget.h index a236677..d43930e 100644 --- a/src/x86/ffitarget.h +++ b/src/x86/ffitarget.h @@ -50,7 +50,7 @@ #endif #define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION -#define FFI_TARGET_HAS_COMPLEX_TYPE +#define _FFI_TARGET_HAS_COMPLEX_TYPE /* ---- Generic type definitions ----------------------------------------- */ -- 1.7.9.5 --U+BazGySraz5kW0T--