Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Move non-function API from ndarrayobject.h into arraytypes.h (Trac #1481) #2078

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

Closed
thouis opened this issue Oct 19, 2012 · 7 comments
Closed

Comments

@thouis
Copy link
Contributor

thouis commented Oct 19, 2012

Original ticket http://projects.scipy.org/numpy/ticket/1481 on 2010-05-08 by trac user abingham, assigned to unknown.

This change moves the parts of ndarrayobject.h that don't depend on the PY_ARRAY_UNIQUE_SYMBOL and NO_IMPORT into a new header, arraytypes.h. The intent of this change is to allow users to include the types, enums, etc. associated with arrays without needing to worry about the macro definitions.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Attachment added by trac user abingham on 2010-05-08: arraytype_h_addition.diff

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@charris wrote on 2010-05-09

OK, I made this change in r8397-r8398 because I couldn't think of a good reason not to ;) However, I changed the header name to ndarraytypes.h because there is already an arraytypes.h buried down in numpy/core/src/multiarray and I thought best to avoid possible confusion. This change does separate out two different sorts of things, although I think the real culprit here is __multiarray_api.h. I'm not up to dealing with that, however, nor it's almost equally ugly cousin __ufunc_api.h. There should probably be completely different include files for the various varieties of include so that the choice of header corresponds to what is currently chosen with the various defines.

Can you write up a short explanation of the use/need for this change so I can include it in the release notes? I could probably put that together from the mailing list thread but you can probably do a better job of it.

Also feel free to improve the file if you have the time. The multiline comments need to be put in standard form, i.e.,

/*

  • blah, blah
    */

and it would be nice to collect all the includes up at the top so one could see the dependencies at a glance.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@charris wrote on 2010-05-09

Make that multiline thingie

/*
 * blah, blah
 */

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Attachment added by trac user abingham on 2010-05-09: ndarraytypes_cleaup.diff

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

trac user abingham wrote on 2010-05-09

Release note: ndarraytypes.h now contains the symbols from ndarrayobject.h that no not depend on the PY_ARRAY_UNIQUE_SYMBOL and NO_IMPORT/_ARRAY macros. Broadly, these symbols are types, typedefs, and enumerations; the array function calls are left in ndarrayobject.h. This allows users to include array-related types and enumerations without needing to concern themselves with the macro expansions and their side-effects.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@charris wrote on 2010-05-09

Nice. Applied in r8402, thanks.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Milestone changed to 1.6.0 by @mwiebe on 2011-05-31

@thouis thouis closed this as completed Oct 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant