FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Semantics of p_c_pointer and PointerToCPtr · Issue #592 · lcompilers/lpython · GitHub

Semantics of p_c_pointer and PointerToCPtr #592

Description

Currently p_c_pointer(pointer(xi32), p) gets translated to:

         (= 
            (Var 6 p) 
            (PointerToCPtr 
               (GetPointer 
                  (Var 6 xi32) 
                  (Pointer 
                     (Integer 4 [])) ()) 
               (CPtr) ()) ()) 

and p_c_pointer(xi64, p) gets translated to:

         (= 
            (Var 6 p) 
            (PointerToCPtr 
               (Var 6 xi64) 
               (CPtr) ()) ()) 

What should be the recommended usage? It seems to me the second case is incorrect, as PointerToCPtr should only accepts pointers as the first argument?

The other issue is: we need to also have a CPython implementation of whatever syntax/semantics we choose. If it cannot be done for the above syntax, then we need to change it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL