From 7be172dc68172ee368fc92803a5d8e40a7b35007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Sat, 24 Jul 2004 15:17:15 +0000 Subject: [PATCH] Don't depend on the presence of the SWIG-PointerAddress function. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6065 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/guile/common.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Lib/guile/common.scm b/Lib/guile/common.scm index 4c9128289..a51d3a71d 100644 --- a/Lib/guile/common.scm +++ b/Lib/guile/common.scm @@ -47,7 +47,13 @@ (display (number->string (object-address o) 16) file)) (define (display-pointer-address o file) - (display (number->string (SWIG-PointerAddress o) 16) file)) + ;; Don't fail if the function SWIG-PointerAddress is not present. + (let ((address (false-if-exception (SWIG-PointerAddress o)))) + (if address + (begin + (display " @ " file) + (display (number->string address 16) file))))) + (define-method (write (o ) file) ;; We display _two_ addresses to show the object's identity: ;; * first the address of the GOOPS proxy object, @@ -61,9 +67,10 @@ (display (class-name class) file) (display #\space file) (display-address o file) - (display " @ " file) (display-pointer-address o file) (display ">" file)) (next-method)))) (export ) + +;;; common.scm ends here