-
Notifications
You must be signed in to change notification settings - Fork 513
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
Added marshalling to struct... #525
base: main
Are you sure you want to change the base?
Conversation
cls => cls.Bases.Any(clss => clss.IsClass && clss.Class == @class)))) | ||
return false; | ||
|
||
if (@class.IsPOD || @class.IsValueType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @tritao had in mind was to use IsPOD instead of IsValueType. So you'd best change it to just:
return @class.IsPOD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Marshalling some classes as structs is OK, this is what @tritao 's idea is: marshal types based on their usage, not on the key-word which means almost nothing in C++. The error you get, however, is indeed a problem. What exactly is it? |
@ddobrev The code marshals a class which was intended to be a Ref type as I had written it for testing a fix when CS_OUT was applied to a ref type argument. |
d45e2da
to
dd941d9
Compare
@ddobrev Adding this pass to generator didn't seem to be good. Because of two main reasons: |
Hello @genuinelucifer . Please accept my apologies for this huge delay. I've been really busy with Qt#, I am almost ready to build GUI examples with it and it needs a last effort. Meanwhile please proceed with the task about delegates, it's more important than this one anyway. |
@ddobrev That's great! :) I had a look into Qt# and it really seems that you have put much much effort into it. Best of Luck! I'm actually unable to proceed with the delegates task because I actually don't know much about them and actually couldn't figure out how to do that. I will post my real problems on that issue soon. |
@genuinelucifer I am glad you have started thinking about the task. Feel free to ask any questions. I still don't have time to review this one but I have more than enough for questions. |
ad9811b
to
beabb82
Compare
ff30267
to
e6a74df
Compare
Hey @ddobrev we should review this soon. |
1610aa5
to
64b1efd
Compare
c930b78
to
c38556a
Compare
4c1e9b8
to
2fdd082
Compare
bcf41e4
to
851ec5e
Compare
97610ec
to
a2aeaed
Compare
Mostly done... But, one other error is exposed due to this. And moreover it now also marshals few C++ classes to C# struct.
Was that intended while using
@class.IsPOD
@tritao @ddobrevAlso, I did not add the check for is declared as struct this time.