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

Seg Fault when iterate through a NSIndexSet using block notation #1

Open
Dayof opened this issue Aug 20, 2017 · 1 comment
Open

Seg Fault when iterate through a NSIndexSet using block notation #1

Dayof opened this issue Aug 20, 2017 · 1 comment
Assignees

Comments

@Dayof
Copy link

@Dayof Dayof commented Aug 20, 2017

Example code : http://dpaste.com/3234SY3

Output :

index 0
Segmentation fault: 11

@ojii
Copy link
Owner

@ojii ojii commented Aug 20, 2017

from rubicon.objc import *

index = ObjCClass('NSIndexSet')
range_idx = NSRange(0,4)

sl = index.alloc().initWithIndexSet(index.alloc().initWithIndexesInRange(range_idx))

def block(idx: int, stop: bool) -> None:
    print('index', idx)

sl.enumerateIndexesUsingBlock_(block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.