MCPcopy Create free account
hub / github.com/libgit2/pygit2 / pgit_borrow_fsdefault

Function pgit_borrow_fsdefault

src/utils.c:66–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66char*
67pgit_borrow_fsdefault(PyObject *value, PyObject **tvalue)
68{
69 PyObject *str = PyOS_FSPath(value);
70 if (str == NULL) {
71 return NULL;
72 }
73
74 PyObject *bytes = PyUnicode_EncodeFSDefault(str);
75 if (bytes == NULL) {
76 return NULL;
77 }
78
79 *tvalue = bytes;
80 return PyBytes_AS_STRING(bytes);
81}
82
83/**
84 * Return a pointer to the underlying C string in 'value'. The pointer is

Callers 15

Tree_containsFunction · 0.85
tree_getentry_by_pathFunction · 0.85
Reference_renameFunction · 0.85
Reference_set_targetFunction · 0.85
Repository_status_fileFunction · 0.85
Odb_initFunction · 0.85
Odb_add_disk_alternateFunction · 0.85
TreeBuilder_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…