Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow casting between hl.Abstracts #680

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fourst4r
Copy link

Not sure if should check abs_name here or not.
I mainly wanted this to be able to do a hl_dyn_call with an abstract as argument.

@ncannasse
Copy link
Member

There should definitely be a check for abs_name before we allow this. Usually the to == from would already handle this

@yuxiaomao
Copy link
Collaborator

to == form do the job if the type comes from haxe side.
When callback using hl_dyn_call, if we pass &hlt_abstract it's not the same type as the haxe side; if we construct an hlt_abstract, the abs_name's char* pointer is not the same as what module.c generate.
It's difficult to get hl.Type for hl.Abstract at haxe side either, I tried just cast and I have Error: Extern type not supported : hl.Abstract<hl.Abstract.Const> on compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants