File: Source.xs

package info (click to toggle)
libgit-raw-perl 0.87%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,464 kB
  • sloc: perl: 5,404; ansic: 182; makefile: 6
file content (49 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
MODULE = Git::Raw			PACKAGE = Git::Raw::Filter::Source


SV *
id(self)
	Filter_Source self

	CODE:
		RETVAL = git_oid_to_sv(git_filter_source_id(self));

	OUTPUT: RETVAL

SV *
path(self)
	Filter_Source self

	CODE:
		RETVAL = newSVpv(git_filter_source_path(self), 0);

	OUTPUT: RETVAL

SV *
file_mode(self)
	Filter_Source self

	CODE:
		RETVAL = newSViv(git_filter_source_filemode(self));

	OUTPUT: RETVAL

SV *
mode(self)
	Filter_Source self

	PREINIT:
		git_filter_mode_t mode;
		const char *result = NULL;

	CODE:
		mode = git_filter_source_mode(self);

		if (mode == GIT_FILTER_TO_WORKTREE)
			result = "to_worktree";
		else if (mode == GIT_FILTER_TO_ODB)
			result = "to_odb";

		RETVAL = newSVpv(result, 0);

	OUTPUT: RETVAL