From: SourceForge.net <no...@so...> - 2012-02-23 12:21:08
|
Patches item #3476148, was opened at 2012-01-19 10:51 Message generated for change (Comment added) made by ambs You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=301645&aid=3476148&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: general Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Alberto Manuel Brandão Simões (ambs) Assigned to: Nobody/Anonymous (nobody) Summary: [Perl] add accessor to std_list.i Initial Comment: I just found out that I was unable to access elements from a std::list in Perl. After some mails in the users mailing list I figured out that other languages, like Python and Ruby, have accessors and setters for std::list. My time, and my understanding on the std_list.i file for Perl is not complete, and therefore I just hacked it a little to implement a get method. Together with the size method (already available) it makes it possible to fetch elements from the list. In the future I might try to implement a method to return the full list as a standard Perl list (not sure how hard that would be). But that or an iterator would be the preferred solutions (I know). So, for now I would thank if you could accept this patch for the next release (although incomplete). Thanks Alberto ---------------------------------------------------------------------- >Comment By: Alberto Manuel Brandão Simões (ambs) Date: 2012-02-23 04:21 Message: Patch fixed. It was a stupid bug. If you like the idea, I can try to help adding more accessors, but for that I would need some feedback. Cheers ---------------------------------------------------------------------- Comment By: Alberto Manuel Brandão Simões (ambs) Date: 2012-01-19 11:07 Message: Meanwhile, added an elements method, that returns a list of elements. It seems to be working, but again, I didn't check the specializations for built-ins. ---------------------------------------------------------------------- Comment By: Alberto Manuel Brandão Simões (ambs) Date: 2012-01-19 11:06 Message: Note that I did not test for built-in types. Sorry. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=301645&aid=3476148&group_id=1645 |