Skip to content

Generate function entries for a couple of extensions #5347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kocsismate
Copy link
Member

No description provided.

@kocsismate
Copy link
Member Author

The only problem I see so far is that there are some extensions (bz2 and zlib) that define aliases from ext/standard, which makes it impossible to generate function entries for them.

@kocsismate kocsismate force-pushed the stub-function-entries branch 2 times, most recently from c5126fc to ff2939a Compare April 4, 2020 13:02
@kocsismate kocsismate force-pushed the stub-function-entries branch 2 times, most recently from a5cbaac to 5166e10 Compare April 4, 2020 13:32
@kocsismate kocsismate force-pushed the stub-function-entries branch from 5166e10 to 2339b89 Compare April 4, 2020 13:33
@nikic
Copy link
Member

nikic commented Apr 4, 2020

The only problem I see so far is that there are some extensions (bz2 and zlib) that define aliases from ext/standard, which makes it impossible to generate function entries for them.

Should be fixable by adjusting

php-src/build/gen_stub.php

Lines 764 to 770 in a43bc33

$code .= generateCodeWithConditions($fileInfo->funcInfos, "", function(FuncInfo $funcInfo) {
if ($funcInfo->alias) {
return null;
}
return "ZEND_FUNCTION($funcInfo->name);\n";
});
to forward declare the alias if there is one. (This might result in duplicate declares -- those could either be deduplicated or just left, because they're harmless.)

@nikic
Copy link
Member

nikic commented Apr 4, 2020

AppVeyor failure is legit:

ext\com_dotnet\com_handlers.c(227): warning C4090: 'return': different 'const' qualifiers
ext\com_dotnet\com_handlers.c(412): error C2065: 'zif_com_create_instance': undeclared identifier
ext\com_dotnet\com_handlers.c(412): warning C4047: '=': 'zif_handler' differs in levels of indirection from 'int'
ext\com_dotnet\com_handlers.c(415): error C2065: 'zif_com_variant_create_instance': undeclared identifier
ext\com_dotnet\com_handlers.c(415): warning C4047: '=': 'zif_handler' differs in levels of indirection from 'int'
ext\com_dotnet\com_handlers.c(540): warning C4028: formal parameter 1 different from declaration
ext\com_dotnet\com_handlers.c(540): warning C4028: formal parameter 2 different from declaration

@Girgias
Copy link
Member

Girgias commented Apr 4, 2020

I imagine the issue with aliases also means that currently there is no way to add deprecated function entries?
I would imagine these would get annotated in the same way as alias functions.

@cmb69
Copy link
Member

cmb69 commented Apr 4, 2020

AppVeyor failure is legit:

I'll have a look, unless someone beats me to it. :)

@kocsismate
Copy link
Member Author

kocsismate commented Apr 4, 2020

I left out ext/com_dotnet until Christoph's PR fixes the issues.

@Girgias Good observation! There is no way to do it yet, but I think I can implement it.

@nikic I'll also take care of the forward declarations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants