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

deal with seq[T] casting to ptr SeqHeader with --gc:arc #126

Open
gogolxdong opened this issue Sep 7, 2020 · 3 comments
Open

deal with seq[T] casting to ptr SeqHeader with --gc:arc #126

gogolxdong opened this issue Sep 7, 2020 · 3 comments

Comments

@gogolxdong
Copy link

type
  SeqHeader = object
    length, reserved: int

proc isLiteral*(s: string): bool {.inline.} =
  (cast[ptr SeqHeader](s.cstring).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0

proc isLiteral*[T](s: seq[T]): bool {.inline.} =
  (cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0

How to deal with seq[T] casting to ptr SeqHeader with --gc:arc

@dryajov
Copy link
Member

dryajov commented Sep 7, 2020

We aren't supporting the ARC gc ATM.

@dryajov dryajov closed this as completed Sep 7, 2020
@dryajov dryajov reopened this Sep 7, 2020
@gogolxdong
Copy link
Author

When will arc/orc be supported?

@dryajov
Copy link
Member

dryajov commented Sep 9, 2020

ATM, we're sticking with the smallest stable feature subset in Nim and unfortunately ARC/ORC aren't 100% stable.

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

No branches or pull requests

2 participants