Skip to content
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

Variable arguments are left out of docs #27

Open
tiennou opened this issue Jul 24, 2018 · 1 comment
Open

Variable arguments are left out of docs #27

tiennou opened this issue Jul 24, 2018 · 1 comment

Comments

@tiennou
Copy link
Contributor

tiennou commented Jul 24, 2018

See for example, git_commit_create_v, which doesn't show that its arguments are variable.

For the record, here's the relevant clang AST for it, which, apart from the ellipsis at the end of the FunctionDecl, is silent on its vararg-ness.

|-FunctionDecl 0x7facec834460 <include/git2/common.h:42:27, include/git2/commit.h:395:5> line:385:17 git_commit_create_v 'int (git_oid *, git_repository *, const char *, const git_signature *, const git_signature *, const char *, const char *, const git_tree *, size_t, ...)' extern
| |-ParmVarDecl 0x7facec8338f8 <line:386:2, col:11> col:11 id 'git_oid *'
| |-ParmVarDecl 0x7facec833968 <line:387:2, col:18> col:18 repo 'git_repository *'
| |-ParmVarDecl 0x7facec834000 <line:388:2, col:14> col:14 update_ref 'const char *'
| |-ParmVarDecl 0x7facec834070 <line:389:2, col:23> col:23 author 'const git_signature *'
| |-ParmVarDecl 0x7facec8340e0 <line:390:2, col:23> col:23 committer 'const git_signature *'
| |-ParmVarDecl 0x7facec834150 <line:391:2, col:14> col:14 message_encoding 'const char *'
| |-ParmVarDecl 0x7facec8341c0 <line:392:2, col:14> col:14 message 'const char *'
| |-ParmVarDecl 0x7facec834230 <line:393:2, col:18> col:18 tree 'const git_tree *'
| |-ParmVarDecl 0x7facec8342a0 <line:394:2, col:9> col:9 parent_count 'size_t':'unsigned long'
| |-VisibilityAttr 0x7facec834550 <include/git2/common.h:43:20, col:40> Default
| `-FullComment 0x7facec11fd20 <include/git2/commit.h:372:3, line:383:25>
|   |-ParagraphComment 0x7facec11faa0 <line:372:3, col:70>
|   | `-TextComment 0x7facec11fa70 <col:3, col:70> Text=" Create new commit in the repository using a variable argument list."
|   |-ParagraphComment 0x7facec11fb10 <line:374:3, line:375:46>
|   | |-TextComment 0x7facec11fac0 <line:374:3, col:72> Text=" The message will **not** be cleaned up automatically. You can do that"
|   | `-TextComment 0x7facec11fae0 <line:375:3, col:46> Text=" with the `git_message_prettify()` function."
|   |-ParagraphComment 0x7facec11fbb0 <line:377:3, line:379:59>
|   | |-TextComment 0x7facec11fb30 <line:377:3, col:74> Text=" The parents for the commit are specified as a variable list of pointers"
|   | |-TextComment 0x7facec11fb50 <line:378:3, col:76> Text=" to `const git_commit *`. Note that this is a convenience method which may"
|   | `-TextComment 0x7facec11fb70 <line:379:3, col:59> Text=" not be safe to export for certain languages or compilers"
|   |-ParagraphComment 0x7facec11fc00 <line:381:3, col:65>
|   | `-TextComment 0x7facec11fbd0 <col:3, col:65> Text=" All other parameters remain the same as `git_commit_create()`."
|   |-ParagraphComment 0x7facec11fc50 <line:383:3>
|   | `-TextComment 0x7facec11fc20 <col:3> Text=" "
|   `-BlockCommandComment 0x7facec11fc70 <col:4, col:25> Name="see"
|     `-ParagraphComment 0x7facec11fcd0 <col:8, col:25>
|       `-TextComment 0x7facec11fca0 <col:8, col:25> Text=" git_commit_create"
@tiennou tiennou changed the title doc: variable arguments are left out of docs Variable arguments are left out of docs Jul 24, 2018
@tiennou
Copy link
Contributor Author

tiennou commented Jul 24, 2018

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

No branches or pull requests

1 participant