unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#46522: [PATCH]: Return *unspecified* for define-wrapped-pointer-type.
@ 2021-02-15  4:01 Zhu Zihao
  0 siblings, 0 replies; only message in thread
From: Zhu Zihao @ 2021-02-15  4:01 UTC (permalink / raw)
  To: 46522


[-- Attachment #1.1: Type: text/plain, Size: 157 bytes --]


In (system foreign), define-wrapped-pointer-type return the printer
procedure. It's better to return *unspecified* just like
define-record-type in srfi-9.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Return-unspecified-for-define-wrapped-pointer-type.patch --]
[-- Type: text/x-patch, Size: 946 bytes --]

From b31a5511c530e6b255d3eadf7bae55893eacf3ea Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 15 Feb 2021 11:56:13 +0800
Subject: [PATCH] Return *unspecified* for define-wrapped-pointer-type.

* module/system/foreign.scm (define-wrapped-pointer-type): Return *unspecified*.
---
 module/system/foreign.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/system/foreign.scm b/module/system/foreign.scm
index d1c2ceb96..d8e0d44cc 100644
--- a/module/system/foreign.scm
+++ b/module/system/foreign.scm
@@ -197,4 +197,5 @@ which does the reverse.  PRINT must name a user-defined object printer."
                        (let ((o (%wrap ptr)))
                          (hash-set! ptr->obj ptr o)
                          o)))))
-             (set-record-type-printer! type-name print)))))))
+             (set-record-type-printer! type-name print)
+             *unspecified*))))))
-- 
2.30.0


[-- Attachment #3: Type: text/plain, Size: 101 bytes --]



-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-15  4:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15  4:01 bug#46522: [PATCH]: Return *unspecified* for define-wrapped-pointer-type Zhu Zihao

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).