[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Callee owned WCT's
From: |
Tommi Höynälänmaa |
Subject: |
Callee owned WCT's |
Date: |
Sat, 9 Jun 2018 18:26:52 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Hi
Some procedures in guile-gnome take the ownership of the argument
pointer. For example, pango_attr_list_insert in Pango. I had to modify
g-wrap sources to allow WCT arguments to be declared callee-owned. The
modified version of procedure make-typespec in g-wrap/c-types.scm is here:
---cut-here---
(define (handle-typespec-options options)
(if (and (not (memq 'caller-owned options))
(not (memq 'callee-owned options)))
(cons 'caller-owned options)
options))
(define-method (make-typespec (type <gw-wct>) (options <list>))
(next-method type (if (gw-wcts-nullable?)
(if (memq 'non-null options)
(handle-typespec-options (delq 'non-null
options))
(if (memq 'null-ok options)
(handle-typespec-options options)
(cons 'null-ok
(handle-typespec-options options))))
(handle-typespec-options options))))
---cut-here---
Do you want to make this change into the library?
- Tommi Höynälänmaa
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Callee owned WCT's,
Tommi Höynälänmaa <=