At 02:00 PM 12/12/2003 -0700, Cory Spencer wrote:
When using prototyped subs and mixing native types with PMC types as
arguments, IMCC will get confused. Its because it isn't correctly checking
the prototypes. The other problem is that when you use the shorthand
version of sub calling (_foo(a,b)), IMCC assumes prototyped.
It stems mainly from 2a below.
I recommend: (1) Using non_prototyped subs and explicit .pcc_call directives,
rather than the shorthand version for now.
Until I get some fixes committed you have a couple of other options:
(2) Don't mix PMCs and native types in argument lists if you use prototyped
(2a) If you use PMCs, then IMCC won't coerce a constant argument into a
PMC yet. _foo("bar", val) will pass "bar" as a plain string type, even if
expects a PMC. This is a bug.
I expect to have a large revision soon that will address lots of issues in
it will most likely be in a new branch (imcc2) so as not to cause complete
the "semi-stable" version. Then I will try to backpatch some of those fixes