Skip to content

Remove code comments - #23285

Open
kamil-tekiela wants to merge 2 commits into
php:masterfrom
kamil-tekiela:Remove-code-comments
Open

Remove code comments#23285
kamil-tekiela wants to merge 2 commits into
php:masterfrom
kamil-tekiela:Remove-code-comments

Conversation

@kamil-tekiela

Copy link
Copy Markdown
Member

This might have been an issue on older MSVC but presumably it's no longer the case as zend_mark_internal_attribute has not had a return for the past 4 years and nobody complained.
@NattyNarwhal

Copy link
Copy Markdown
Member

To be honest, I think we could just get rid of those reimplementation functions? unsetenv/setenv are standard on anything Unix shaped (as in, available on v7), and since we don't care about Windows in FPM, we don't ned to worry about that case.

N.B.: clearenv is not standard; it seems to be from a rejected POSIX proposal seemingly only glibc implemented?

@kamil-tekiela

Copy link
Copy Markdown
Member Author

To be honest, I think we could just get rid of those reimplementation functions? unsetenv/setenv are standard on anything Unix shaped (as in, available on v7), and since we don't care about Windows in FPM, we don't ned to worry about that case.

N.B.: clearenv is not standard; it seems to be from a rejected POSIX proposal seemingly only glibc implemented?

Ok, well, I don't know anything about FPM. I was just trying to fix a superficial problem. But if these functions should be removed, can you open a separate PR and I will drop the commit from my PR?

@NattyNarwhal

Copy link
Copy Markdown
Member

Ok, well, I don't know anything about FPM. I was just trying to fix a superficial problem. But if these functions should be removed, can you open a separate PR and I will drop the commit from my PR?

Just did so. Also looking at other instances of this, and I think I found a similar "fun" comment related to these functions already...

#if !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV)
        /*  if cgi, or fastcgi and not found in fcgi env
                check the regular environment
                this leaks, but it's only cgi anyway, we'll fix
                it for 5.0
        */              
        len = name_len + (value ? strlen(value) : 0) + sizeof("=") + 2;
        buf = (char *) malloc(len);     
        if (buf == NULL) {
                return getenv(name);            
        }                                               
#endif                  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants