| 1 | MODULE = Git::Raw PACKAGE = Git::Raw::Tree::Entry | ||
| 2 | |||
| 3 | SV * | ||
| 4 | id(self) | ||
| 5 | Tree_Entry self | ||
| 6 | |||
| 7 | PREINIT: | ||
| 8 | const git_oid *oid; | ||
| 9 | |||
| 10 | CODE: | ||
| 11 | 3 | oid = git_tree_entry_id(self); | |
| 12 | 3 | RETVAL = git_oid_to_sv((git_oid *) oid); | |
| 13 | |||
| 14 | OUTPUT: RETVAL | ||
| 15 | |||
| 16 | SV * | ||
| 17 | name(self) | ||
| 18 | Tree_Entry self | ||
| 19 | |||
| 20 | PREINIT: | ||
| 21 | const char *name; | ||
| 22 | |||
| 23 | CODE: | ||
| 24 | 31 | name = git_tree_entry_name(self); | |
| 25 | 31 | RETVAL = newSVpv(name, 0); | |
| 26 | |||
| 27 | OUTPUT: RETVAL | ||
| 28 | |||
| 29 | SV * | ||
| 30 | file_mode(self) | ||
| 31 | Tree_Entry self | ||
| 32 | |||
| 33 | CODE: | ||
| 34 | 7 | RETVAL = newSViv(git_tree_entry_filemode(self)); | |
| 35 | |||
| 36 | OUTPUT: RETVAL | ||
| 37 | |||
| 38 | SV * | ||
| 39 | type(self) | ||
| 40 | Tree_Entry self | ||
| 41 | |||
| 42 | CODE: | ||
| 43 | 2 | RETVAL = newSViv(git_tree_entry_type(self)); | |
| 44 | |||
| 45 | OUTPUT: | ||
| 46 | RETVAL | ||
| 47 | |||
| 48 | SV * | ||
| 49 | object(self) | ||
| 50 | SV *self | ||
| 51 | |||
| 52 | PREINIT: | ||
| 53 | int rc; | ||
| 54 | |||
| 55 | git_object *obj; | ||
| 56 | Repository repo; | ||
| 57 | |||
| 58 | Tree_Entry entry; | ||
| 59 | |||
| 60 | CODE: | ||
| 61 | 35 | repo = INT2PTR(Repository, SvIV((SV *) GIT_SV_TO_MAGIC(self))); | |
| 62 | |||
| 63 | 35 | entry = GIT_SV_TO_PTR(Tree::Entry, self); | |
| 64 | |||
| 65 | 35 | rc = git_tree_entry_to_object(&obj, repo -> repository, entry); | |
| 66 | 35 | git_check_error(rc); | |
| 67 | |||
| 68 | 35 | RETVAL = git_obj_to_sv(obj, GIT_SV_TO_MAGIC(self)); | |
| 69 | |||
| 70 | OUTPUT: RETVAL | ||
| 71 | |||
| 72 | void | ||
| 73 | DESTROY(self) | ||
| 74 | SV *self | ||
| 75 | |||
| 76 | CODE: | ||
| 77 | 33 | git_tree_entry_free(GIT_SV_TO_PTR(Tree::Entry, self)); | |
| 78 | 33 | SvREFCNT_dec(GIT_SV_TO_MAGIC(self)); |