You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in a stack overflow on calls such as typeMap.SignatureType(ctx).ToString() (which are used at various points) as ToString on Type again goes over the type maps and calls ToString on the signature type, repeat ad infinitum.
One potential solution is adding the following method to TypeMap:
and replacing all calls such as typeMap.SignatureType(ctx).ToString() with typeMap.Print(ctx).
However, this would require modifications on the end of the user which is not ideal. Some other way to avoid the cycles here seems preferable, but I don't see a straightforward way of achieving that atm..
P.S.: For anyone stumbling across this issue seeking to accomplish something similar to me while a fix hasn't yet been implemented:
A simple workaround is initially picking a different name for the generated enum and renaming it it in the Postprocess step.
The text was updated successfully, but these errors were encountered:
I have the following header:
I would like to end up with
Test.MyMethod
havingMyFlags
as a parameter instead ofint
.To this end at first I
var @enum = ctx.GenerateEnumFromMacros("MyFlags", "FLAG_(.*)")
.I then use the following
TypeMap
:whereas
MyFlagsMap.Type = new TagType(@enum)
.This results in a stack overflow on calls such as
typeMap.SignatureType(ctx).ToString()
(which are used at various points) asToString
onType
again goes over the type maps and callsToString
on the signature type, repeat ad infinitum.One potential solution is adding the following method to
TypeMap
:and replacing all calls such as
typeMap.SignatureType(ctx).ToString()
withtypeMap.Print(ctx)
.However, this would require modifications on the end of the user which is not ideal. Some other way to avoid the cycles here seems preferable, but I don't see a straightforward way of achieving that atm..
P.S.: For anyone stumbling across this issue seeking to accomplish something similar to me while a fix hasn't yet been implemented:
A simple workaround is initially picking a different name for the generated enum and renaming it it in the
Postprocess
step.The text was updated successfully, but these errors were encountered: