Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/contrib/libgit-sys/public_symbol_export.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / contrib / libgit-sys / public_symbol_export.c` 59 lines ยท 1344 bytes Raw Blame History 1 /* 2 * Shim to publicly export Git symbols. These must be renamed so that the 3 * original symbols can be hidden. Renaming these with a "libgit_" prefix also 4 * avoids conflicts with other libraries such as libgit2. 5 */ 6 7 #include "git-compat-util.h" 8 #include "config.h" 9 #include "contrib/libgit-sys/public_symbol_export.h" 10 #include "version.h" 11 12 #pragma GCC visibility push(default) 13 14 struct libgit_config_set { 15 struct config_set cs; 16 }; 17 18 struct libgit_config_set *libgit_configset_alloc(void) 19 { 20 struct libgit_config_set *cs = 21 xmalloc(sizeof(struct libgit_config_set)); 22 git_configset_init(&cs->cs); 23 return cs; 24 } 25 26 void libgit_configset_free(struct libgit_config_set *cs) 27 { 28 git_configset_clear(&cs->cs); 29 free(cs); 30 } 31 32 int libgit_configset_add_file(struct libgit_config_set *cs, const char *filename) 33 { 34 return git_configset_add_file(&cs->cs, filename); 35 } 36 37 int libgit_configset_get_int(struct libgit_config_set *cs, const char *key, 38 int *dest) 39 { 40 return git_configset_get_int(&cs->cs, key, dest); 41 } 42 43 int libgit_configset_get_string(struct libgit_config_set *cs, const char *key, 44 char **dest) 45 { 46 return git_configset_get_string(&cs->cs, key, dest); 47 } 48 49 const char *libgit_user_agent(void) 50 { 51 return git_user_agent(); 52 } 53 54 const char *libgit_user_agent_sanitized(void) 55 { 56 return git_user_agent_sanitized(); 57 } 58 59 #pragma GCC visibility pop