C API

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

C API

Charles R Harris
All,

I added a function to array_api_order.txt and apparently this changed the order of the pointers in the API, which caused ctypes to segfault until I removed the build directory and did a complete rebuild. It seems to me that if we really want to make adding these API functions safe, then we should only have one list instead of the current two. This looks to require some mods to the build system. What do folks think?

Chuck

_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: C API

Travis Oliphant-5
Charles R Harris wrote:
> All,
>
> I added a function to array_api_order.txt and apparently this changed
> the order of the pointers in the API, which caused ctypes to segfault
> until I removed the build directory and did a complete rebuild. It
> seems to me that if we really want to make adding these API functions
> safe, then we should only have one list instead of the current two.
> This looks to require some mods to the build system. What do folks think?
Yes, or a simple solution is to only append to one of the lists.   At
the very least,  we should mark the array_api_order as not appendable.

-Travis

_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: C API

Charles R Harris


On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant <[hidden email]> wrote:
Charles R Harris wrote:
> All,
>
> I added a function to array_api_order.txt and apparently this changed
> the order of the pointers in the API, which caused ctypes to segfault
> until I removed the build directory and did a complete rebuild. It
> seems to me that if we really want to make adding these API functions
> safe, then we should only have one list instead of the current two.
> This looks to require some mods to the build system. What do folks think?
Yes, or a simple solution is to only append to one of the lists.   At
the very least,  we should mark the array_api_order as not appendable.

That doesn't work unless I change the tag from OBJECT_API to MULTIARRAY_API. Do these tags really matter? Maybe we should just replace them with API and merge this lists. At the beginning of 1.2, of course.

Chuck



_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: C API

Charles R Harris


On Thu, May 22, 2008 at 3:55 PM, Charles R Harris <[hidden email]> wrote:


On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant <[hidden email]> wrote:
Charles R Harris wrote:
> All,
>
> I added a function to array_api_order.txt and apparently this changed
> the order of the pointers in the API, which caused ctypes to segfault
> until I removed the build directory and did a complete rebuild. It
> seems to me that if we really want to make adding these API functions
> safe, then we should only have one list instead of the current two.
> This looks to require some mods to the build system. What do folks think?
Yes, or a simple solution is to only append to one of the lists.   At
the very least,  we should mark the array_api_order as not appendable.

That doesn't work unless I change the tag from OBJECT_API to MULTIARRAY_API. Do these tags really matter? Maybe we should just replace them with API and merge this lists. At the beginning of 1.2, of course.

This doesn't look to hard to do. How about a unified NUMPY_API list?

Chuck


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: C API

Travis Oliphant-5
Charles R Harris wrote:

>
>
> On Thu, May 22, 2008 at 3:55 PM, Charles R Harris
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>
>     On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Charles R Harris wrote:
>         > All,
>         >
>         > I added a function to array_api_order.txt and apparently
>         this changed
>         > the order of the pointers in the API, which caused ctypes to
>         segfault
>         > until I removed the build directory and did a complete
>         rebuild. It
>         > seems to me that if we really want to make adding these API
>         functions
>         > safe, then we should only have one list instead of the
>         current two.
>         > This looks to require some mods to the build system. What do
>         folks think?
>         Yes, or a simple solution is to only append to one of the
>         lists.   At
>         the very least,  we should mark the array_api_order as not
>         appendable.
>
>
>     That doesn't work unless I change the tag from OBJECT_API to
>     MULTIARRAY_API. Do these tags really matter? Maybe we should just
>     replace them with API and merge this lists. At the beginning of
>     1.2, of course.
>
>
> This doesn't look to hard to do. How about a unified NUMPY_API list?
That's fine with me.  I can't remember why there were 2 separate lists.

-Travis


_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: C API

Charles R Harris


On Thu, May 22, 2008 at 6:36 PM, Travis E. Oliphant <[hidden email]> wrote:
Charles R Harris wrote:
>
>
> On Thu, May 22, 2008 at 3:55 PM, Charles R Harris
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>
>     On Thu, May 22, 2008 at 3:34 PM, Travis E. Oliphant
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Charles R Harris wrote:
>         > All,
>         >
>         > I added a function to array_api_order.txt and apparently
>         this changed
>         > the order of the pointers in the API, which caused ctypes to
>         segfault
>         > until I removed the build directory and did a complete
>         rebuild. It
>         > seems to me that if we really want to make adding these API
>         functions
>         > safe, then we should only have one list instead of the
>         current two.
>         > This looks to require some mods to the build system. What do
>         folks think?
>         Yes, or a simple solution is to only append to one of the
>         lists.   At
>         the very least,  we should mark the array_api_order as not
>         appendable.
>
>
>     That doesn't work unless I change the tag from OBJECT_API to
>     MULTIARRAY_API. Do these tags really matter? Maybe we should just
>     replace them with API and merge this lists. At the beginning of
>     1.2, of course.
>
>
> This doesn't look to hard to do. How about a unified NUMPY_API list?
That's fine with me.  I can't remember why there were 2 separate lists.

OK. Another question, why do __ufunc_api.h and __multiarray_api.h have double underscores prefixes?

Chuck



_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion