-
Notifications
You must be signed in to change notification settings - Fork 601
Some deduplications in parser #23838
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
Conversation
embed.fnc
Outdated
| p |void |package_v544 |NN OP *o \ | ||
| |NULLOK OP *v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be called "package2()" if you're going for a non-descriptive new name.
Otherwise package_with_version() or package_and_version() seem more reasonable then either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, that's what I forgot in PR message ... updated.
Honestly, I prefer API version in another version of function - it clearly says when it was added without need to consult additional tools (which in fact are not aware of semantics)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tonycoz Perl_package changed, original functions are now static and new function remains package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename S_package (maybe S_package_named) to keep the base name distinct from Perl_package.
0c7fed2 to
fe52a7b
Compare
|
Documentation build warnings: |
1b863e4 to
481a3e2
Compare
|
@tonycoz done |
481a3e2 to
8715272
Compare
leonerd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine but I'd like to see a slight addition to the docs.
op.c
Outdated
| Function combines former C<package> and C<package_version> into single call. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than say "this does what something else that's now been deleted used to do", I'd just explain what this function actually does. Perhaps keep this note as a footnote in the bottom, but it needs explaining in its own terms first.
8715272 to
f4ec0b6
Compare
op.c
Outdated
| package ($name, $version) | ||
|
|
||
| Function sets current stash name and if not NULL, sets its C<$VERSION>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to put the synopsis part; perldoc does that automatically.
Also missing the word "version"; as
... and if I<version> is not NULL, sets its C<$VERSION>.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
f4ec0b6 to
916af43
Compare
|
Your tests are all currently failing, due to the mismatch in parameter names between You probably want to go fix the names in |
916af43 to
9931558
Compare
op.c
Outdated
| /* | ||
| =for apidoc package | ||
|
|
||
| package ($name, $version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line isn't necessary. The perldoc generator will create that sort of thing for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Function combines call of original `package` and `package_version` when new namespace statement is detected. Instead of required three statements usage now consists of single function call.
9931558 to
b03c9cd
Compare
leonerd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Internal changes - move duplicated code into dedicated functions.