Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
develop
Breadcrumbs
php-git
/
message.c
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
24 lines (20 loc) · 662 Bytes
develop
Breadcrumbs
php-git
/
message.c
Copy path
Top
File metadata and controls
Code
Blame
24 lines (20 loc) · 662 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "php_git2.h"
#include "php_git2_priv.h"
#include "message.h"
/* {{{ proto resource git_message_prettify(string $message, long $strip_comments)
*/
PHP_FUNCTION(git_message_prettify)
{
char *out = NULL, *message = NULL;
long out_size = 0, strip_comments = 0;
int message_len = 0, error = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"sl", &message, &message_len, &strip_comments) == FAILURE) {
return;
}
out_size = git_message_prettify(NULL, NULL, message, strip_comments);
out = (char*)emalloc(sizeof(char) * out_size);
error = git_message_prettify(out, out_size, message, strip_comments);
RETURN_STRING(out, 0);
}
/* }}} */
You can’t perform that action at this time.