* guile-gnome, devel: fixing a couple of problems in corba primitives.scm
@ 2014-07-05 21:30 David Pirotte
0 siblings, 0 replies; only message in thread
From: David Pirotte @ 2014-07-05 21:30 UTC (permalink / raw)
To: guile-devel
[-- 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-05 21:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05 21:30 guile-gnome, devel: fixing a couple of problems in corba primitives.scm David Pirotte
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).