Re: [C++-sig] bindings size

2009-01-23 Thread Renato Araujo
hi David, This size is about my library, when I use "class_" and ".def()" templates from libboost_python. And about the g++ flags I use -Os which includes most of the flags for size optimizations. I tried with others flags but the difference is minimum, nothing significant. Thanks On Fri, Jan 23

Re: [C++-sig] bindings size

2009-01-23 Thread David Abrahams
on Fri Jan 23 2009, Renato Araujo wrote: > I'm current using "CXXFLAGS=-ffunction-sections -Os" and "LDFLAGS > --gc-sections", and the library already striped, without strip the > size is about 12MB. There's a lot more you can do. -fomit-frame-pointer, -finline-functions, ...man gcc, man Ther

Re: [C++-sig] Custom smart pointer and bp::wrapper

2009-01-23 Thread Paul Melis
Paul Melis wrote: > Roman Yakovenko wrote: > >> 2009/1/17 Paul Melis : >> >> >>> But when trying to run >>> >>> import doh >>> >>> class MyCallback(doh.Callback): >>>def execute(self, t): >>>print t >>>return 1 >>> >>> m = MyCallback() >>> >>> t = doh.Thing() >>> t.se

Re: [C++-sig] create boost array from a Numpy PyArray without copying data?

2009-01-23 Thread AFoglia
Sebastian Walter wrote: And is there a way to get the refcount of an object within Python? I'd like to test if the refcount is correct. sys.getrefcount(obj) Good to know. When I run - --- test.py from _test import * import sys def test_my_array(): a =

Re: [C++-sig] bindings size

2009-01-23 Thread Renato Araujo
I'm current using "CXXFLAGS=-ffunction-sections -Os" and "LDFLAGS --gc-sections", and the library already striped, without strip the size is about 12MB. On Fri, Jan 23, 2009 at 1:31 PM, David Abrahams wrote: > > on Fri Jan 23 2009, Renato Araujo wrote: > >> hi all, >> After some vacation I got

Re: [C++-sig] bindings size

2009-01-23 Thread David Abrahams
on Fri Jan 23 2009, Renato Araujo wrote: > hi all, > After some vacation I got back to my library binding. Most problems > have been solved > but now I got another big problem here. My current binding library is very > huge > compared to the wrapped C++ library (about four times). Checking the

[C++-sig] bindings size

2009-01-23 Thread Renato Araujo
hi all, After some vacation I got back to my library binding. Most problems have been solved but now I got another big problem here. My current binding library is very huge compared to the wrapped C++ library (about four times). Checking the code I found that the components responsible for a great

Re: [C++-sig] create boost array from a Numpy PyArray without copying data?

2009-01-23 Thread Ravi
On Friday 23 January 2009 04:44:43 Sebastian Walter wrote: > > In the code you posted this time, incref() is required so that someone > > owns a reference to the array object. What I don't know off the top of my > > head is whether you need an incref in the constructor of A and a decref > > in the

Re: [C++-sig] create boost array from a Numpy PyArray without copying data?

2009-01-23 Thread Sebastian Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, thanks for your replies: they helped a lot. Ravi schrieb: > On Thursday 22 January 2009 05:51:20 Sebastian Walter wrote: >> In my above case I know that *x won't be deleted because it is global, >> right? > > *x is not deleted since you used PyA