At 20:32 4/5/2001, Johan Ekenberg wrote:
>Zeev,
>
>thanks, that made all the difference!
>
>I got a suggestion from another PHP-developer that mixing calls to
>emalloc() and strcpy() might be a problem. Is this so?
Not it's not; A block you get from emalloc() is very much the same as a
block yo
On Fri, 4 May 2001, Johan Ekenberg wrote:
> Zeev,
>
> thanks, that made all the difference!
>
> I got a suggestion from another PHP-developer that mixing calls to
> emalloc() and strcpy() might be a problem. Is this so?
>
No, I've never experienced a problem.
-Sterling
--
PHP Development Mai
Zeev,
thanks, that made all the difference!
I got a suggestion from another PHP-developer that mixing calls to
emalloc() and strcpy() might be a problem. Is this so?
/Johan
> erealloc() (like realloc()) returns a pointer to the
> realloc'd string. It
> may or may not be the same pointer you s
erealloc() (like realloc()) returns a pointer to the realloc'd string. It
may or may not be the same pointer you specifed in the first argument. So,
your code should look like:
...
tmp_variable = erealloc(tmp_variable, ...);
Otherwise, you're going to have both a bug and if it doesn't crash y
I have a question regarding the API, something that bit me while I was
working with the php_imap code:
Basically I did this (pseudocode):
char init_value[10] = "foobar";
tmp_variable = emalloc(strlen(init_value) + 1);
strcpy(tmp_variable, init_value);
while(condition) {
ereall