From 2f38c8e5e86c360aaae5b7e461bb8e27a2520977 Mon Sep 17 00:00:00 2001 From: Hans Meine Date: Sun, 16 Mar 2014 11:23:37 +0100 Subject: DOC: suggest definition of unique symbol in .h I find it much more convenient to define the PY_ARRAY_UNIQUE_SYMBOL in a header file #included by all files of the extension (than to repeat its definition in each and every file). --- doc/source/reference/c-api.array.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc/source/reference/c-api.array.rst') diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index 3ce49cb85..2ce43b2be 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -2899,10 +2899,14 @@ the C-API is needed then some additional steps must be taken. .. code-block:: c - #define PY_ARRAY_UNIQUE_SYMBOL cool_ARRAY_API #define NO_IMPORT_ARRAY + #define PY_ARRAY_UNIQUE_SYMBOL cool_ARRAY_API #include numpy/arrayobject.h + You can also put the common two last lines into an extension-local + header file as long as you make sure that NO_IMPORT_ARRAY is + #defined before #including that file. + Checking the API Version ^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.2.1