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

Comments

Projects
None yet
2 participants
@Dayof

Dayof commented Aug 20, 2017

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

Output :

index 0
Segmentation fault: 11

@ojii

This comment has been minimized.

Show comment
Hide comment
@ojii

ojii Aug 20, 2017

Owner
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)
Owner

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