Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Stefan Seefeld
On 12.01.2016 13:54, Tony Cappellini wrote: > > > In your something class, the data type returned from allocate_memory() > > needs to be something that Python understands. Since that allocation > > function (member) will be allocating 100s of MB of memory, how will > > this memory map to a Python d

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Tony Cappellini
>>(https://docs.python.org/3/c-api/memoryview.html). I should have mentioned that I am using Python 2.7 (as part of a group project- others are using Python 2.7 as well). Python 3.x is out of the question at the moment, but the memory view looks like an interesting idea. __

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Tony Cappellini
6 at 10:14 AM, Stefan Seefeld wrote: > On 12.01.2016 12:52, Tony Cappellini wrote: > > > > Stefan, > > > > > > To: cplusplus-sig@python.org <mailto:cplusplus-sig@python.org> > > Subject: Re: [C++-sig] Passing memory allocated in C++ to Python > >

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Stefan Seefeld
On 12.01.2016 12:52, Tony Cappellini wrote: > > Stefan, > > > To: cplusplus-sig@python.org <mailto:cplusplus-sig@python.org> > Subject: Re: [C++-sig] Passing memory allocated in C++ to Python > Message-ID: <56945036.8080...@seefeld.name > <mailto:56945036.8

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Tony Cappellini
Stefan, To: cplusplus-sig@python.org Subject: Re: [C++-sig] Passing memory allocated in C++ to Python Message-ID: <56945036.8080...@seefeld.name> Content-Type: text/plain; charset=windows-1252 > Essentially- Python needs access to the return value from a malloc() call. >>Really

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-11 Thread Stefan Seefeld
Hi Tony, On 11.01.2016 17:56, Tony Cappellini wrote: > > > I've already got a project built for Linux, using Boost-python. My > Python code can import the C++ extension and access the members that > are exposed. > > My C++ code needs to call fill in C++ structures in order to call > ioctl() functi

[C++-sig] Passing memory allocated in C++ to Python

2016-01-11 Thread Tony Cappellini
I've already got a project built for Linux, using Boost-python. My Python code can import the C++ extension and access the members that are exposed. My C++ code needs to call fill in C++ structures in order to call ioctl() functions, while passing the addresses of the structures to the ioctl funct