@@ -27,40 +27,62 @@ GIT_EXTERN(int) git_repository_init(
2727 unsigned is_bare);
2828
2929
30- // error code will handle extension.
30+ // error code should handle in extension.
3131// resource creation or getting functions will return their resource or bool.
3232resource|bool function git_repository_init(string $path, long $is_bare);
3333
34- some small structure (e.g: git_config_entry) should consider return as an array. it's usefull .
34+ public struct (e.g: git_config_entry) should consider return as an array.
3535````
3636
37- see http:// libgit2.github.com/libgit2/#HEAD
37+ see libgit2.github.com/libgit2/#v0.20.0
3838
3939##### file name rules.
4040
4141basically, we rely libgit2 grouping at this time. (` branch ` group functions should be in branch.c)
42- some group (e.g config) will conflicts php headers . we choose ` g_ ` prefix for now.
42+ some group (e.g config) will conflicts php header files . we choose ` g_ ` prefix for now.
4343
44- check grouping here http:// libgit2.github.com/libgit2/#HEAD
44+ check grouping here libgit2.github.com/libgit2/#v0.20.0
4545
4646##### generating files
4747
4848if you wanna try to work new file. please use gen.php and generate stubs. as declarations are bored task.
4949(sometimes, this generator might output wrong headers. then just comment out or fix generator)
5050
5151````
52- php gen.php libgit2/include/git2/branch.h (0|1) [filter] > target.c or target.h
52+ php gen.php libgit2/include/git2/branch.h 0 > branch.h
53+
54+ # improved code generator
55+ php ng.php libgit2/include/git2/branch.h > branch.c
5356````
5457
55- you can ouptut function entry with this. past it to ` php_git2.c `
58+ you can generate ` PHP_FE ` with this. past it to ` php_git2.c `
5659
5760````
5861php fe.php target.c
5962````
6063
64+ Note: usually, these generators might output needless variables. DON'T PR ` prettify codes ` at this moment.
65+ As we have more than 500 php functions. we like to use some fixer command than fix by hand.
66+
67+ ##### documents
68+
69+ use prototype.
70+
71+ ```
72+ /* {{{ proto int abs(int number)
73+ Returns the absolute value of the number */
74+ PHP_FUNCTION(abs)
75+ {
76+ ...
77+ }
78+ /* }}} */
79+ ```
80+
81+ document will generate later. please check source code before publish docs.
82+
6183##### testing
6284
63- group/ function.phpt
85+ [ group] / [ function] .phpt
6486
6587##### policy
6688
0 commit comments