return get_oid_hex_algop(hex, oid, the_hash_algo);
}
-int parse_oid_hex_algop(const char *hex, struct object_id *oid,
- const char **end,
- const struct git_hash_algo *algop)
+int parse_oid_hex_algop_impl(const char *hex, struct object_id *oid,
+ const char **end,
+ const struct git_hash_algo *algop)
{
int ret = get_oid_hex_algop(hex, oid, algop);
if (!ret)
* other invalid character. end is only updated on success; otherwise, it is
* unmodified.
*/
-int parse_oid_hex_algop(const char *hex, struct object_id *oid, const char **end,
- const struct git_hash_algo *algo);
+#define parse_oid_hex_algop(hex, oid, end, algo) \
+ parse_oid_hex_algop_impl((hex), (oid), CONST_OUTPARAM((hex), (end)), (algo))
+int parse_oid_hex_algop_impl(const char *hex, struct object_id *oid, const char **end,
+ const struct git_hash_algo *algo);
/*
* These functions work like get_oid_hex and parse_oid_hex, but they will parse
char *email_end, *message;
timestamp_t timestamp;
int tz;
- const char *p = sb->buf;
+ char *p = sb->buf;
/* old SP new SP name <email> SP time TAB msg LF */
if (!sb->len || sb->buf[sb->len - 1] != '\n' ||