[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile-gi: scancode->keyval?
From: |
Jan Nieuwenhuizen |
Subject: |
Re: guile-gi: scancode->keyval? |
Date: |
Fri, 14 Jun 2019 13:14:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Mike Gran writes:
Hi!
> I hadn't implemented automated wrapping of C procedures that return
> output via pointer to plain C types, such as
>
> gboolean gdk_event_get_keyval (const GdkEvent *event,
> guint *keyval);
>
> I fixed it, I think.
Yes, great!
> There are many, many unit tests to be written and memory allocations
> to be checked. Sigh.
...and I found another one, trying to load text in the test/editor.scm example
(let ((buffer (send editor (get-buffer))))
(warn 'buffer buffer) ; => ;; WARNING (buffer #<<GtkTextBuffer>
22bcc30>)
;; BOOM: => free(): invalid pointer
(send buffer (set-text "Hello, world!")))
Greetings,
janneke
>From 49393b1720e14aac103d9027458327cbe3806661 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Fri, 14 Jun 2019 13:10:26 +0200
Subject: [PATCH] editor test: load text.
---
test/editor.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/editor.scm b/test/editor.scm
index a8f49f2..db12144 100644
--- a/test/editor.scm
+++ b/test/editor.scm
@@ -19,7 +19,6 @@
(typelib-load "Gdk" "3.0")
(typelib-load "Gtk" "3.0")
(typelib-load "GLib" "2.0")
-(typelib-load "WebKit2" "4.0")
(define (print-goodbye widget data)
(display "Goodbye World\n"))
@@ -47,6 +46,10 @@
#f))
(connect editor (key-press-event key-press #f))
(send editor (grab-focus))
+ (let ((buffer (send editor (get-buffer))))
+ (warn 'buffer buffer) ; => ;; WARNING (buffer #<<GtkTextBuffer>
22bcc30>)
+ ;; BOOM: => free(): invalid pointer
+ (send buffer (set-text "Hello, world!")))
(send button-box (add button))
(send window (show-all))))
--
2.21.0
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com