Skip to content

Add support for unsafe keyword #62

Open
@WizzardMaker

Description

@WizzardMaker

Thanks for implementing init so quickly last time!

I've found out, that the unsafe keyword is missing in the interface generation.
It's necessary for using pointer types

Example:

public class Test {
    public unsafe Test* Function() {
        return (Test*)0;  
    }
}

Should generate:

public interface Test {
    public unsafe Test* Function();
}

On a side note, I've also seen that IntPtr gets converted to nint - they are syntactically the same but slightly differ in semantics, where IntPtr always denotes "unsafe" pointers and nint just being a representation of the native integer size.
Nothing too critical but just wanted to point it out

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