Skip to content

Commit 9004689

Browse files
committed
object_type: mark old values as deprecated
Mark old object type values as `static const` so that we can mark them as deprecated with the `GIT_DEPRECATED` macro.
1 parent 628ebc5 commit 9004689

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/git2/types.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -450,16 +450,16 @@ typedef struct git_mailmap git_mailmap;
450450

451451
/**@{*/
452452

453-
#define GIT_OBJ_ANY GIT_OBJECT_ANY
454-
#define GIT_OBJ_BAD GIT_OBJECT_BAD
455-
#define GIT_OBJ__EXT1 0
456-
#define GIT_OBJ_COMMIT GIT_OBJECT_COMMIT
457-
#define GIT_OBJ_TREE GIT_OBJECT_TREE
458-
#define GIT_OBJ_BLOB GIT_OBJECT_BLOB
459-
#define GIT_OBJ_TAG GIT_OBJECT_TAG
460-
#define GIT_OBJ__EXT2 5
461-
#define GIT_OBJ_OFS_DELTA GIT_OBJECT_OFS_DELTA
462-
#define GIT_OBJ_REF_DELTA GIT_OBJECT_REF_DELTA
453+
GIT_DEPRECATED(static const int) GIT_OBJ_ANY = GIT_OBJECT_ANY;
454+
GIT_DEPRECATED(static const int) GIT_OBJ_BAD = GIT_OBJECT_BAD;
455+
GIT_DEPRECATED(static const int) GIT_OBJ__EXT1 = 0;
456+
GIT_DEPRECATED(static const int) GIT_OBJ_COMMIT = GIT_OBJECT_COMMIT;
457+
GIT_DEPRECATED(static const int) GIT_OBJ_TREE = GIT_OBJECT_TREE;
458+
GIT_DEPRECATED(static const int) GIT_OBJ_BLOB = GIT_OBJECT_BLOB;
459+
GIT_DEPRECATED(static const int) GIT_OBJ_TAG = GIT_OBJECT_TAG;
460+
GIT_DEPRECATED(static const int) GIT_OBJ__EXT2 = 5;
461+
GIT_DEPRECATED(static const int) GIT_OBJ_OFS_DELTA = GIT_OBJECT_OFS_DELTA;
462+
GIT_DEPRECATED(static const int) GIT_OBJ_REF_DELTA = GIT_OBJECT_REF_DELTA;
463463

464464
#define git_otype git_object_t
465465

0 commit comments

Comments
 (0)