perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject [rfc] APR::Table & polymorphic values
Date Mon, 02 Jun 2003 06:09:18 GMT
I wanted to get some feedback on how to 
add APR::Table support for apreq-2's "polymorphic"
value strings.

The issue is that apreq-2 uses apr_tables, 
but adds additional metadata to each table 
value.  The current APR::Table glue uses

  newSVpv((char *)val, 0)

to convert the char* to an SV*.  That's not
totally adequate for apreq-2, since it forgets
about the metadata stored in front of val.

For apreq-2, what I'd like to have happen
is for a callback to do the type conversion 
instead of newSVpv.  The callback would be
attached to the APR::Table object, so the 
XS glue for APR::Table would need a 
patch to use the callback in place of the 
newSVpv calls.

It looks to me like mg_ptr is NULL for the 
TIEHASH magic associated to APR::Table
objects.  Are there any objections to a patch 
that uses a callback stored there? 

Can anyone recommend a better approach?

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message