bugnyacc parser generator - Bugs: bug #65594, define-fh-type-alias doesn't work

 
 

bug #65594: define-fh-type-alias doesn't work

Submitter:  Matt Wette <mwette>
Submitted:  Sun 14 Apr 2024 04:11:38 PM UTC
   
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  mwette
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 19 Apr 2024 08:17:06 PM UTC, comment #4: 

Fixed but not great in 1.09.4.

Matt Wette <mwette>
Group administrator
Sun 14 Apr 2024 10:28:50 PM UTC, comment #3: 

This is 1.09.3, BWT.  Hope to fix for 1.09.4.

Matt Wette <mwette>
Group administrator
Sun 14 Apr 2024 09:54:52 PM UTC, comment #2: 

For this:
;; bug65594.ffi -*- Scheme -*-

(define-ffi-module (ffi bug95594)
  #:api-code "
typedef struct _foo foo_t;

struct _foo {
  int x;
  int y;
};
  ")

;; --- last line ---


I get output that does not reference struct ffi.
That seems to be the problem.


;; generated with `guild compile-ffi ffi/bug95594.ffi'

(define-module (ffi bug95594)
  #:use-module (system ffi-help-rt)
  #:use-module ((system foreign) #:prefix ffi:)
  #:use-module (bytestructures guile))

(define ffi-bug95594-llibs (delay (list)))


;; typedef struct _foo foo_t;
(define-public foo_t-desc 'void)
(define-public foo_t*-desc (fh:pointer (delay foo_t-desc)))
(define-fh-pointer-type foo_t* foo_t*-desc foo_t*? make-foo_t*)
(export foo_t* foo_t*? make-foo_t*)

;; struct _foo {
;;   int x;
;;   int y;
;; };
(define-public struct-_foo-desc
  (bs:struct (list `(x ,int) `(y ,int))))
(define-fh-compound-type struct-_foo struct-_foo-desc struct-_foo?
 make-struct-_foo)
(export struct-_foo struct-_foo? make-struct-_foo)
(define-public struct-_foo*-desc
  (fh:pointer struct-_foo-desc))
(define-fh-pointer-type struct-_foo* struct-_foo*-desc struct-_foo*?
 make-struct-_foo*)
(export struct-_foo* struct-_foo*? make-struct-_foo*)
(fh-ref<=>deref!
  struct-_foo*
  make-struct-_foo*
  struct-_foo
  make-struct-_foo)
(set! foo_t-desc struct-_foo-desc)
(define-fh-compound-type foo_t foo_t-desc foo_t? make-foo_t)
(export foo_t foo_t? make-foo_t)
(fh-ref<=>deref!
  foo_t*
  make-foo_t*
  foo_t
  make-foo_t)

Matt Wette <mwette>
Group administrator
Sun 14 Apr 2024 05:20:10 PM UTC, comment #1: 

this is for 1.09.4 BTW

Matt Wette <mwette>
Group administrator
Sun 14 Apr 2024 04:11:38 PM UTC, original submission:  

ytestructures/body/struct.scm:169:9: In procedure setter:
Invalid value for writing into struct. #<GdkRectangle 0x76b4c09307a0>

Matt Wette <mwette>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mwette (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-19 mwette StatusIn Progress Fixed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code