--- Derick Rethans <[EMAIL PROTECTED]> wrote:
> On Tue, 27 Jan 2004, unkno me wrote:
> 
> > I am using the zend_parse_parameter function to
> > retrieve a string passed to my function like:
> >
> > char* s, int sl;
> 
> You need to use a long for sl here.

I changed it. Thanks!

> 
> >
> > zend_parse_parameter(ZEND_NUM_ARGS()
> TSRMLS_CC,"s", &s,&sl);
> 
> Shouldn't it be zend_parse_parameters (with an extra
> s?)
> 

Sorry. A typo.

> 
> Might be memory curruption somewhere else, try to
> run with valgrind to
> see if that's the case.
> 

Here is what I got when I passed '100% free stuff' to
the function and use fprintf(stderr,"[%s %ld]\n",s,sl)
to print them out:

[100 free 8]
[100 free stuff 14]
[free 4]
[stuff 5]

As you can see, each time the result is different and
NONE of them match what really passed it! And the
result is not consistent either! I am very confuse
about it and don't know how to solve that. Is there a
manual way of extracting the paramters from the
function instead of using the zend_* API?

I have never used valgrind. I know it's a debugger of
some sort. Where can I download it? And how can I
start it to debug my extension? Thanks!

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to