From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.devel Subject: guile-gnome, devel: fixing a couple of problems in corba primitives.scm Date: Sat, 5 Jul 2014 18:30:27 -0300 Message-ID: <20140705183027.0b52a868@capac> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/nuHGiXUm69oiN1=6B6YJD.m" X-Trace: ger.gmane.org 1404595863 14232 80.91.229.3 (5 Jul 2014 21:31:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jul 2014 21:31:03 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jul 05 23:30:54 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X3XXo-00021Y-0A for guile-devel@m.gmane.org; Sat, 05 Jul 2014 23:30:52 +0200 Original-Received: from localhost ([::1]:44019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XXn-0004gC-FI for guile-devel@m.gmane.org; Sat, 05 Jul 2014 17:30:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XXg-0004g3-96 for guile-devel@gnu.org; Sat, 05 Jul 2014 17:30:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3XXa-00015G-V1 for guile-devel@gnu.org; Sat, 05 Jul 2014 17:30:44 -0400 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:52578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XXa-000154-Ka for guile-devel@gnu.org; Sat, 05 Jul 2014 17:30:38 -0400 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 2B990A04C109 for ; Sat, 5 Jul 2014 23:30:37 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id DJfTgWNPH5yO for ; Sat, 5 Jul 2014 23:10:51 +0200 (CEST) Original-Received: from capac (unknown [189.60.115.53]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 46E3EA04C108 for ; Sat, 5 Jul 2014 23:30:30 +0200 (CEST) X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 79.99.200.102 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17292 Archived-At: --MP_/nuHGiXUm69oiN1=6B6YJD.m Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, guile-gnome devel: fixing a couple of problems in corba primitives.scm Attached... Happy hacking, David --MP_/nuHGiXUm69oiN1=6B6YJD.m Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0013-fixing-a-couple-of-problems-in-corba-primitives.scm.patch >From 7711856084a821c8d3640074bd6def0fffc42a2e Mon Sep 17 00:00:00 2001 From: David PIROTTE Date: Sat, 5 Jul 2014 18:27:18 -0300 Subject: [PATCH 13/13] fixing a couple of problems in corba primitives.scm * corba/gnome/corba/primitives.scm: (1) use #:export within the module definition to export both classes, (2) use (eval-when (expand load eval) (%init-gnome-corba-primitives)) [expand has been added here] and (3) fixing allocate-instance for instances: (a) renaming class as type to solve a bug, and (b) removing or from the if condition, it's unnecessary, the default value for the call to get-keyword is #f. --- corba/gnome/corba/primitives.scm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/corba/gnome/corba/primitives.scm b/corba/gnome/corba/primitives.scm index 2e8577a..ec11e44 100644 --- a/corba/gnome/corba/primitives.scm +++ b/corba/gnome/corba/primitives.scm @@ -1,6 +1,7 @@ ;; guile-gnome ;; Copyright (C) 2001 Martin Baulig -;; 2003,2004 Andy Wingo +;; Copyright (C) 2003,2004 Andy Wingo +;; Copyright (C) 2014 David Pirotte ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -29,7 +30,10 @@ :use-module (gnome gw corba) :use-module (gnome corba types) :use-module (gnome gobject) - :use-module (oop goops)) + :use-module (oop goops) + + :export ( + )) (define-class () (%orbit-iinterface #:allocation #:each-subclass) @@ -39,19 +43,19 @@ (corba-typecode #:allocation #:each-subclass) (corba-objref)) -(eval-when (load eval) +(eval-when (expand load eval) (%init-gnome-corba-primitives)) (define-method (allocate-instance (class ) initargs) (corba-primitive-make-poa-instance class)) -(define-method (allocate-instance (class ) initargs) - (if (or (get-keyword #:dsupers initargs #f)) - (next-method) - (let* ((object (next-method)) - (servant (get-keyword #:servant initargs *unspecified*)) - (ior (get-keyword #:ior initargs *unspecified*))) - (gnome-corba-error "Can't make instances of this type: ~A" type)))) +(define-method (allocate-instance (type ) initargs) + (if (get-keyword #:dsupers initargs #f) + (next-method) + (let* ((object (next-method)) + (servant (get-keyword #:servant initargs *unspecified*)) + (ior (get-keyword #:ior initargs *unspecified*))) + (gnome-corba-error "Can't make instances of this type: ~A" type)))) (define (display-address o file) (display (number->string (object-address o) 16) file)) @@ -66,6 +70,3 @@ (display-address o file) (display #\> file)) (next-method)))) - -(eval-when (expand load eval) - (export )) -- 2.0.0 --MP_/nuHGiXUm69oiN1=6B6YJD.m--