[C++-sig] exposing pointer to Python

Roman Yakovenko roman.yakovenko at gmail.com
Tue Jul 7 21:36:22 CEST 2009


On Tue, Jul 7, 2009 at 5:16 PM, Alexey Akimov<alexey.akimov85 at gmail.com> wrote:
> Thank you, Renato
>
> However this is still not clear how to wrap a pointer to double using that
> indexing_suites. For types like vector<double> it is pretty much clear, but
> what do i need to do in order to wrap just a simple poiner to double?

The short answer: you can not. The long answer - use Google

> Also i have related question - how can i wrap an overloaded indexing
> operator - []? For numerical operators there are some signatures like
> .def(self+self) ,etc, but for operator [] i've never seen any such usage
> signatures? Is there any way to do this?

Yes. Take a look on one of my call policies:

http://language-binding.net/pyplusplus/documentation/functions/call_policies/return_range.html

This should give you an idea and direction.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list