mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-07 11:10:40 +00:00
Get rid of GIT__PRIVATE macro
Using it in the first place means something's wrong. This patch replaces it with an internal header which carries the previously "protected" code instead. Internal source-files simply include "commit.h" and they're done. The internal header includes the public one to make sure we always use the proper prototype. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
36f0f61fc8
commit
4f0adcd0e6
1
Makefile
1
Makefile
@ -6,7 +6,6 @@ CFLAGS = -g -O2 -Wall
|
|||||||
OS = unix
|
OS = unix
|
||||||
|
|
||||||
BASIC_CFLAGS := -Isrc
|
BASIC_CFLAGS := -Isrc
|
||||||
BASIC_CFLAGS += -DGIT__PRIVATE
|
|
||||||
BASIC_CFLAGS += -fvisibility=hidden
|
BASIC_CFLAGS += -fvisibility=hidden
|
||||||
|
|
||||||
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
|
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "git/commit.h"
|
#include "commit.h"
|
||||||
|
|
||||||
const git_oid *git_commit_id(git_commit *c)
|
const git_oid *git_commit_id(git_commit *c)
|
||||||
{
|
{
|
||||||
|
14
src/commit.h
Normal file
14
src/commit.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef INCLUDE_commit_h__
|
||||||
|
#define INCLUDE_commit_h__
|
||||||
|
#include "git/commit.h"
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
struct git_commit {
|
||||||
|
git_oid id;
|
||||||
|
time_t commit_time;
|
||||||
|
unsigned parsed:1,
|
||||||
|
flags:26;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -40,14 +40,6 @@ GIT_BEGIN_DECL
|
|||||||
|
|
||||||
/** Parsed representation of a commit object. */
|
/** Parsed representation of a commit object. */
|
||||||
typedef struct git_commit git_commit;
|
typedef struct git_commit git_commit;
|
||||||
#ifdef GIT__PRIVATE
|
|
||||||
struct git_commit {
|
|
||||||
git_oid id;
|
|
||||||
time_t commit_time;
|
|
||||||
unsigned parsed:1,
|
|
||||||
flags:26;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse (or lookup) a commit from a revision pool.
|
* Parse (or lookup) a commit from a revision pool.
|
||||||
|
Loading…
Reference in New Issue
Block a user