Will Coleda via RT wrote:
On Mon Oct 29 11:11:03 2007, bernhard wrote:
In pdd17_pmc.pod it is stated that 'new_from_string' is deprecated.
The existing use of 'new_from_string' can probably be achieved with
'init' or
'set_string_native'.
TODO:
Hunt down existing use of 'new_i_s' and either replace or remove the
functionality.
The FixedIntegerArray is an example of where 'new_from_string' is used.
Given the usage in compilers/imcc/pbc.c:
_class = interp->vtables[r->pmc_type]->pmc_class;
p = VTABLE_new_from_string(interp, _class, s, PObj_constant_FLAG);
Is there a standard for passing the flags? In the old scheme, we had a specific argument to
pass in the flags... There are a lot of cases where we pass in flags here; Do we now have to
create a Hash PMC in each case? If it's a Hash, then we have to setup a convention to pass
the flags... but doing this just as a convention seems to be ripe for mistakes; Clues welcome
on how to proceed.
'new_from_string' is widely used by .const, for example :
.const .String key_print = "print"
or
.const .Sub _create = 'create'
What becomes this kind of constructor ?
Francois.