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
List all PHP extension api version no in zend_extensions.h #1523
Conversation
Minor detail here, I think they should be done at Zend/ level too, but as for the naming, then usually things in Zend/ are prefixed with ZEND_XXX, you can always make an alias of them with the name PHP_XXX from inside main/, for example main/php.h where the "PHP" counterpart of that value is defined. |
Hi @KalleZ, do you mean to move the constants into main/php.h ? |
Hi @c9s I mean like, have the ones in Zend/ defined like:
Then inside main/ we would have it like:
(Note I chacnged the names since it would sound 'wrong' otherwise) This is usually the way many of the "cloned" API are named in regards to Zend/ and main/, cc @dstogov |
makes sense, let me update the header files. |
a1f2d6a
to
181b4ab
Compare
Hi @KalleZ , I only updated Thanks! |
👍 |
181b4ab
to
48aa030
Compare
👍 |
2 similar comments
👍 |
👍 |
These look somewhat dangerous to me, since essentially the only thing you are doing here is exploiting that undefined macros are folded to 0 in So, if you want to add something like this, I'd drop the API nos and just define |
@nikic however if I think this is just a re-useable constants & reference (or documented code) derived from |
@c9s You're right, that was a bad example. We could only start using this with So as this can only serve as documentation and cannot be used directly, maybe put the list of API nos in a comment instead? |
c3ad65e
to
726e603
Compare
- Put doc constants in comment - Link to github issue php#1523
726e603
to
5de0e5d
Compare
- Put doc constants in comment - Link to github issue php#1523
@nikic I agree, the PR is updated. |
- Put doc constants in comment - Link to github issue php#1523
5de0e5d
to
1273ae8
Compare
@nikic one idea: maybe we can have a extension skeleton generator that generates some helpful macros & functions in the header files. (maybe in another PR) |
Hi @smalyshev, This PR is not a quickfix, It's adding document for extension version constants. |
This PR provides a list of extension API no of each PHP release for extension developers to look up the extension versions