| 1 |
|
| MODULE = Git::Raw PACKAGE = Git::Raw::Signature |
| 2 |
|
| |
| 3 |
|
| Signature |
| 4 |
|
| new(class, name, email, time, off) |
| 5 |
|
| SV *class |
| 6 |
|
| SV *name |
| 7 |
|
| SV *email |
| 8 |
|
| SV *time |
| 9 |
|
| unsigned off |
| 10 |
|
| |
| 11 |
|
| PREINIT: |
| 12 |
|
| int rc; |
| 13 |
|
| Signature sig; |
| 14 |
|
| |
| 15 |
|
| git_time_t git_time; |
| 16 |
|
| |
| 17 |
|
| CODE: |
| 18 |
9 |
| sscanf(SvPVbyte_nolen(time), "%" PRId64, &git_time); |
| 19 |
|
| |
| 20 |
9 |
| rc = git_signature_new( |
| 21 |
|
| &sig, git_ensure_pv(name, "name"), |
| 22 |
|
| git_ensure_pv(email, "email"), git_time, off |
| 23 |
|
| ); |
| 24 |
9 |
| git_check_error(rc); |
| 25 |
|
| |
| 26 |
9 |
| RETVAL = sig; |
| 27 |
|
| |
| 28 |
|
| OUTPUT: RETVAL |
| 29 |
|
| |
| 30 |
|
| Signature |
| 31 |
|
| now(class, name, email) |
| 32 |
|
| SV *class |
| 33 |
|
| SV *name |
| 34 |
|
| SV *email |
| 35 |
|
| |
| 36 |
|
| PREINIT: |
| 37 |
|
| int rc; |
| 38 |
|
| Signature sig; |
| 39 |
|
| |
| 40 |
|
| CODE: |
| 41 |
2 |
| rc = git_signature_now( |
| 42 |
|
| &sig, git_ensure_pv(name, "name"), git_ensure_pv(email, "email") |
| 43 |
|
| ); |
| 44 |
2 |
| git_check_error(rc); |
| 45 |
|
| |
| 46 |
2 |
| RETVAL = sig; |
| 47 |
|
| |
| 48 |
|
| OUTPUT: RETVAL |
| 49 |
|
| |
| 50 |
|
| Signature |
| 51 |
|
| default(class, repo) |
| 52 |
|
| SV *class |
| 53 |
|
| Repository repo |
| 54 |
|
| |
| 55 |
|
| PREINIT: |
| 56 |
|
| int rc; |
| 57 |
|
| Signature sig; |
| 58 |
|
| |
| 59 |
|
| CODE: |
| 60 |
7 |
| rc = git_signature_default(&sig, repo -> repository); |
| 61 |
7 |
| git_check_error(rc); |
| 62 |
|
| |
| 63 |
7 |
| RETVAL = sig; |
| 64 |
|
| |
| 65 |
|
| OUTPUT: RETVAL |
| 66 |
|
| |
| 67 |
|
| SV * |
| 68 |
|
| name(self) |
| 69 |
|
| Signature self |
| 70 |
|
| |
| 71 |
|
| CODE: |
| 72 |
21 |
| RETVAL = newSVpv(self -> name, 0); |
| 73 |
|
| |
| 74 |
|
| OUTPUT: RETVAL |
| 75 |
|
| |
| 76 |
|
| SV * |
| 77 |
|
| email(self) |
| 78 |
|
| Signature self |
| 79 |
|
| |
| 80 |
|
| CODE: |
| 81 |
21 |
| RETVAL = newSVpv(self -> email, 0); |
| 82 |
|
| |
| 83 |
|
| OUTPUT: RETVAL |
| 84 |
|
| |
| 85 |
|
| SV * |
| 86 |
|
| time(self) |
| 87 |
|
| Signature self |
| 88 |
|
| |
| 89 |
|
| PREINIT: |
| 90 |
|
| char *buf; |
| 91 |
|
| git_time_t time; |
| 92 |
|
| |
| 93 |
|
| CODE: |
| 94 |
17 |
| time = self -> when.time; |
| 95 |
|
| |
| 96 |
17 |
| Newx(buf, snprintf(NULL, 0, "%" PRId64, time)+1, char); |
| 97 |
17 |
| sprintf(buf, "%" PRId64, time); |
| 98 |
|
| |
| 99 |
17 |
| RETVAL = newSVpv(buf, 0); |
| 100 |
17 |
| Safefree(buf); |
| 101 |
|
| |
| 102 |
|
| OUTPUT: RETVAL |
| 103 |
|
| |
| 104 |
|
| int |
| 105 |
|
| offset(self) |
| 106 |
|
| Signature self |
| 107 |
|
| |
| 108 |
|
| CODE: |
| 109 |
15 |
▶ | RETVAL = self -> when.offset; |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = self -> when.offset; |
0 |
15 |
15 |
|
| 110 |
|
| |
| 111 |
|
| OUTPUT: RETVAL |
| 112 |
|
| |
| 113 |
|
| void DESTROY(self) |
| 114 |
|
| Signature self |
| 115 |
|
| |
| 116 |
|
| CODE: |
| 117 |
85 |
| git_signature_free(self); |