Re: Re: access to variables
| From: | Ci | Date: | Tue, 24 Apr 2007 12:53:17 +0000 |
| Subject: | Re: Re: access to variables | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28974@lists.php.net to get a copy of this message | ||
Tijnema ! napisał(a):
Ok, i don't know a lot about the core of PHP, but i do know the C language. First of all, i don't see you declaring buffer somewhere, i guess you did it without showing, or that it is in the core. But if it isn't both, you should do :) Also note that buffer should be declared as char *buffer to be able to use the strcpy function on it. I declared it before, I just wrote here my idea to solve the problem.
Second, when you're using the strcpy function, you have 2 '(' used, and only one ')' I guess this is a type here. (else it would return error on compilation i guess) I rewrote all this stuff from my second computer where I'm working on it. There's second ')' of course. It was just my mistake.
Third, the function strcpy also has a return value. It should be returned to a pointer to the string where it is copied to. so it would become: buffer = strcpy(buffer,Z_STRVAL_P(data)); strcpy function returns pointer to destination data so this can't be the problem. buffer should have correct data.
If all above noted is correct, then it is a problem with your zend_hash_find function, but as i noted already, i don't know a lot of the PHP core, so i can't help further with it. I don't know a lot of PHP core too and propably there's smth wrong with this code.Thanks for respond.