Skip to content

Commit 66ac3ce

Browse files
committed
Don't show allocfmt
It's not possible for the user to access the library's allocation functions, and freeing with the stdlib's may or may not work.
1 parent 6d9dbb8 commit 66ac3ce

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

docs/guides/101-samples/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,6 @@ int error = git_oid_fromstr(&oid, sha);
247247
/* Make a shortened printable string from an OID */
248248
char shortsha[10] = {0};
249249
git_oid_tostr(shortsha, 9, &oid);
250-
251-
/* Or libgit2 can allocate a buffer for you */
252-
char *newsha = git_oid_allocfmt(&oid);
253-
/* … */
254-
free(newsha);
255250
```
256251
257252
([`git_oid_fromstr`](http://libgit2.github.com/libgit2/#HEAD/group/oid/git_oid_fromstr),

0 commit comments

Comments
 (0)