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

change return types (for scalars) to exact size types (ex: int32_t) #2

Closed
seanm opened this issue Nov 2, 2009 · 3 comments
Closed

Comments

@seanm
Copy link
Contributor

seanm commented Nov 2, 2009

As one can see from Xcode's GUI for editing .xcdatamodel files, Core Data supports signed 16, 32, and 64 bit integers for attributes types. In turn, mogenerator creates accessors that return scalars for these attributes. The types returned are: short, int, and long long. These are correct for the current Mac OS ABI.

However, it would be even more correct to return int16_t, int32_t, and int64_t instead.

We once tried to make this change, but it was tricker than I thought because IIRC it assumed that there are NSNumber methods named Value, like 'shortValue' but there is no int16_tValue method.

@rentzsch
Copy link
Owner

rentzsch commented Nov 2, 2009

Yup, that's where I got stuck too. I'm a fan of intXX_t, but decided it wasn't worth the effort (yet).

@seanm
Copy link
Contributor Author

seanm commented Jan 6, 2012

Has anything changed in the last 2 years that would make this achievable at this point?

@rentzsch
Copy link
Owner

rentzsch commented Jan 6, 2012

I don't think so, sorry.

ddrccw pushed a commit to ddrccw/mogenerator that referenced this issue Jan 20, 2014
[NEW] Better return value types: `int16_t`/`int32_t`/`int64_t` instead of `short`/`long`/`long long` and `id` instead of `NSObject*`. closes rentzsch#2, rentzsch#85 (Rob Rix)
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