|
From: Jimi D. <jd...@ac...> - 2016-02-03 21:50:13
|
Hi,
I have created a typedef of a 64 bit integer that will be my return type
called AIORET_TYPE.
ie:
typedef int64_t AIORET_TYPE.
I have a number of functions that return this AIORET_TYPE type. Hence I
don't want to create custom signatures for all of these functions.
My problem is that SWIG believes that this is a structure, is allocating
memory ( of size AIORET_TYPE ) to copy this value into , and it is
returning as a PyObject *.
How can I get SWIG to ignore this type and realize that nothing needs to
be allocated ?
I've tried adding
typedef int64_t AIORET_TYPE;
and
%inline %{
typedef int64_t AIORET_TYPE;
%}
but neither have worked for me and I still see this error message:
swig/python detected a memory leak of type 'AIORET_TYPE *', no
destructor found.
This seems simple but I can't find a good place to start in the
documentation.
-Jimi
--
WARNING - This e-mail or its attachments may contain controlled technical
data or controlled technology within the definition of the International
Traffic in Arms Regulations (ITAR) or Export Administration Regulations
(EAR), and are subject to the export control laws of the U.S. Government.
Transfer of this data or technology by any means to a foreign person,
whether in the United States or abroad, without an export license or other
approval from the U.S. Government, is prohibited. The information contained
in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc.
Any unauthorized review, use, disclosure or distribution is prohibited
without express written consent of ACCES I/O Products, Inc. If you are not
the intended recipient, please contact the sender and destroy all copies of
the original message and enclosed attachments.
|