Return-Path: X-Original-To: apmail-celix-commits-archive@www.apache.org Delivered-To: apmail-celix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D76211863A for ; Thu, 29 Oct 2015 15:28:52 +0000 (UTC) Received: (qmail 41998 invoked by uid 500); 29 Oct 2015 15:28:52 -0000 Delivered-To: apmail-celix-commits-archive@celix.apache.org Received: (qmail 41916 invoked by uid 500); 29 Oct 2015 15:28:52 -0000 Mailing-List: contact commits-help@celix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@celix.apache.org Delivered-To: mailing list commits@celix.apache.org Received: (qmail 41373 invoked by uid 99); 29 Oct 2015 15:28:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2015 15:28:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4484AE3932; Thu, 29 Oct 2015 15:28:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pnoltes@apache.org To: commits@celix.apache.org Date: Thu, 29 Oct 2015 15:29:08 -0000 Message-Id: <59513f6343d642ef9b18d1af16a8bf88@git.apache.org> In-Reply-To: <2d433ae53cee40a7a8eb8924d7c13080@git.apache.org> References: <2d433ae53cee40a7a8eb8924d7c13080@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/50] celix git commit: CELIX-237: Added interface check to that method must return an int. This to always be able to throw "exceptions". disabled printing dyn_types to stdout. CELIX-237: Added interface check to that method must return an int. This to always be able to throw "exceptions". disabled printing dyn_types to stdout. Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/75773baf Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/75773baf Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/75773baf Branch: refs/heads/feature/CELIX-269_depman Commit: 75773baf300fea80a790efa0d7f53a7acb68ef86 Parents: f60ca0d Author: Pepijn Noltes Authored: Fri Oct 16 13:26:47 2015 +0200 Committer: Pepijn Noltes Committed: Fri Oct 16 13:26:47 2015 +0200 ---------------------------------------------------------------------- .../dynamic_function_interface/dyn_interface.c | 11 +++++++++++ .../dynamic_function_interface_tst/dyn_type_tests.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/75773baf/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_interface.c ---------------------------------------------------------------------- diff --git a/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_interface.c b/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_interface.c index 9bb7bcc..823957b 100644 --- a/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_interface.c +++ b/remote_services/remote_service_admin_dfi/dynamic_function_interface/dyn_interface.c @@ -95,6 +95,17 @@ static int dynInterface_checkInterface(dyn_interface_type *intf) { status = ERROR; LOG_ERROR("Parse Error. There must be a header section with a type, version and name entry"); } + + struct method_entry *mEntry = NULL; + TAILQ_FOREACH(mEntry, &intf->methods, entries) { + dyn_type *type = dynFunction_returnType(mEntry->dynFunc); + int descriptor = dynType_descriptorType(type); + if (descriptor != 'N') { + status = ERROR; + LOG_ERROR("Parse Error. Only method with a return type 'N' (native int) are supported. Got return type '%c'\n", descriptor); + break; + } + } } return status; http://git-wip-us.apache.org/repos/asf/celix/blob/75773baf/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp ---------------------------------------------------------------------- diff --git a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp index 9cf81c5..4b9bd41 100644 --- a/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp +++ b/remote_services/remote_service_admin_dfi/dynamic_function_interface_tst/dyn_type_tests.cpp @@ -43,7 +43,7 @@ extern "C" { } FILE *stream = fopen("/dev/null", "w"); - dynType_print(type, stdout); + dynType_print(type, stream); fclose(stream); dynType_destroy(type); //printf("--\n\n");