discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr_shared_ptr.i vs boost_shared_ptr.i


From: Ben Reynwar
Subject: Re: [Discuss-gnuradio] gr_shared_ptr.i vs boost_shared_ptr.i
Date: Mon, 2 May 2011 14:48:02 -0700

I've decided using boost_shared_ptr.i with gnuradio is too hard.  It
would require way too many changes and is not worth it.

On a related note, I've finally worked out how the implicit type
conversion that's going on with the SWIGed gr_basic_block hierarchy is
happening.  It isn't happening, rather it is being done explicitly at
the python level (i.e. in hier_block2.py).

Ben

On Mon, Mar 28, 2011 at 7:49 PM, Ben Reynwar <address@hidden> wrote:
> On Mon, Mar 28, 2011 at 8:01 AM, Tom Rondeau <address@hidden> wrote:
>> On Mon, Mar 21, 2011 at 4:23 PM, Ben Reynwar <address@hidden> wrote:
>>>
>>> The features I'd like to use from the library are the macros
>>> SWIG_SHARED_PTR and SWIG_SHARED_PTR_DERIVED.
>>>
>>> I'm using swig-1.3.40 (standard for ubuntu 10.04).  The macros were
>>> added in swig-1.3.34 (Feb 2008).  In the current version (swig-2.02)
>>> they still work but are deprecated and replaced by %shared_ptr.
>>
>> If they are available in SWIG 1.3.34, then we should be fine supporting it.
>> I still have to make sure there isn't something else in the way Eric
>> implemented it. I'm guessing you are right, though, and that when Eric
>> started using SWIG this way, they did not natively support shared pointers.
>> Hopefully, we can just move over to using the SWIG version without a problem
>> and then you can have access to what you need.
>> Don't worry about the deprecation in version 2 of SWIG; I doubt we'll be
>> moving there any time soon for compatibility reasons.
>> Tom
>
> OK.  I'll do some experimenting with moving over and see how it goes.
>
>>
>>
>>>
>>> On Sun, Mar 20, 2011 at 5:45 PM, Tom Rondeau <address@hidden>
>>> wrote:
>>> > That's a good question, Ben. I need to talk with Eric about this some
>>> > more. I'm also having issues with intrusive_ptr. One issue is that the
>>> > latter is very new in swig and not well supported. I will need to see what
>>> > version the shared-ptr is introduced, too.
>>> >
>>> > Tom
>>> >
>>> > Sent from my iPhone
>>> >
>>> > On Mar 20, 2011, at 5:15 PM, Ben Reynwar <address@hidden> wrote:
>>> >
>>> >> Hi all,
>>> >>
>>> >> I've been trying every now again to create classes in gnuradio that
>>> >> are not signal processing blocks but are wrapped up in the same way
>>> >> used boost::shared_ptr and SWIG.  I haven't been able to replicate how
>>> >> it's done for the signal processing blocks.
>>> >>
>>> >> I have been able to get the same thing working outside of gnuradio
>>> >> using the boost_shared_ptr.i SWIG library.  Unfortunately I can't use
>>> >> that within gnuradio because the namespace clashes with
>>> >> gr_shared_ptr.i.  My guess is that things are done the way they are in
>>> >> gnuradio because when they were written the boost_shared_ptr.i library
>>> >> wasn't available.  Does anyone know of any reasons not to use
>>> >> boost_shared_ptr.i instead of gr_shared_ptr.i within gnuradio?  I
>>> >> think it should make things simpler.
>>> >>
>>> >> Cheers,
>>> >> Ben
>>> >>
>>> >> _______________________________________________
>>> >> Discuss-gnuradio mailing list
>>> >> address@hidden
>>> >> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>> >
>>
>>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]