unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: David Pirotte <david@altosw.be>
To: guile-devel <guile-devel@gnu.org>
Subject: guile-gnome, devel: fixing a couple of problems in corba primitives.scm
Date: Sat, 5 Jul 2014 18:30:27 -0300	[thread overview]
Message-ID: <20140705183027.0b52a868@capac> (raw)

[-- Attachment #1: Type: text/plain, Size: 118 bytes --]

Hello,

	guile-gnome
	  devel:	fixing a couple of problems in corba primitives.scm

Attached...

Happy hacking,
David

[-- Attachment #2: 0013-fixing-a-couple-of-problems-in-corba-primitives.scm.patch --]
[-- Type: text/x-patch, Size: 3054 bytes --]

From 7711856084a821c8d3640074bd6def0fffc42a2e Mon Sep 17 00:00:00 2001
From: David PIROTTE <david@altosw.be>
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 <CORBA:Object> 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 <martin@gnome.org>
-;;               2003,2004 Andy Wingo <wingo at pobox dot com>
+;; Copyright (C) 2003,2004 Andy Wingo <wingo at pobox dot com>
+;; Copyright (C) 2014 David Pirotte <david at altosw dot be>
 
 ;; 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 (<PortableServer-ServantBase>
+	   <CORBA:Object>))
 
 (define-class <PortableServer-ServantBase> (<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 <PortableServer-ServantBase>) initargs)
   (corba-primitive-make-poa-instance class))
 
-(define-method (allocate-instance (class <CORBA:Object>) 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 <CORBA:Object>) 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 <PortableServer-ServantBase> <CORBA:Object>))
-- 
2.0.0


                 reply	other threads:[~2014-07-05 21:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140705183027.0b52a868@capac \
    --to=david@altosw.be \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).