andy128k / cl-gobject-introspection

BSD 2-Clause "Simplified" License
49 stars 15 forks source link

List in signal parameter is not handled correctly #84

Open bohonghuang opened 1 year ago

bohonghuang commented 1 year ago

Take Gio.Application for example, (gir:list-signals-desc (gir:nget-desc gio:*ns* "Application")) will produce:

(#F<activate(): (#V<RETURN-VALUE: VOID>)>
 #F<command-line(#V<command_line: INTEGER>): (#V<RETURN-VALUE: INTEGER>)>
 #F<handle-local-options(#V<options: #S<VariantDict>>): (#V<RETURN-VALUE: INTEGER>)>
 #F<name-lost(): (#V<RETURN-VALUE: BOOLEAN>)>
 #F<open(#V<files: (SEQUENCE I<File>)> #V<hint: STRING>): (#V<RETURN-VALUE: VOID>)>
 #F<shutdown(): (#V<RETURN-VALUE: VOID>)>
 #F<startup(): (#V<RETURN-VALUE: VOID>)>)

where the parameters of signal open contain a list of GFile. However, the pointer to the list and the size of the list are passed to Lisp function directly like this:

(connect app "open"
  (lambda (app files n-files hint)
    (format T "~a~%" files)))
    ;; This prints "#.(SB-SYS:INT-SAP #X56334FB51140)"