Skip Menu |

This queue is for tickets about the Tree-Ternary_XS CPAN distribution.

Report information
The Basics
Id: 27402
Status: new
Priority: 0/
Queue: Tree-Ternary_XS

People
Owner: Nobody in particular
Requestors: cpan [...] prather.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



I hate to report a bug on a piece of code that hasn't been touched in 7 years but the one bit of functionality I need is missing. According to the docs: =head2 insert( STRING ) Inserts STRING into the tree. When a string is inserted, a scalar variable is created to hold whatever data you may wish to associate with the string. A reference to this scalar is returned on a successful insert. If the string is already in the tree, undef is returned. =head2 search( STRING ) Searches for the presence of STRING in the tree. If the string is found, a reference to the associated scalar is returned, otherwise undef is returned. However, upon testing and then looking at the code. This isn't true. I'm no great shakes at C or XS, but it looks like from the code search is returning an int value (1 on success, 0 on failure). Insert appears to be returning an Sv but I'm not sure if it is a new scalar I can stuff a code ref into, or if it is something else (my XS breaks down there), the underlying trie code is definitely returning void. I would absolutely *love* to be able to insert a code ref into an SV associated with a node ... I can find someone with better XS and C foo than myself and see if it can happen, if so a patch will appear.