diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2012-11-12 19:22:49 -0600 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2012-11-13 10:23:05 -0600 |
| commit | 603bee07918b50051d7bb45722932fc409b38a67 (patch) | |
| tree | 99951bc2c5470bc429d42eb9eb6151b2de6b08be /tests-clar/object | |
| parent | d6fb09240913c9756de5f4a2462062008ebac252 (diff) | |
| download | libgit2-603bee07918b50051d7bb45722932fc409b38a67.tar.gz | |
Remove git_hash_ctx_new - callers now _ctx_init()
Diffstat (limited to 'tests-clar/object')
| -rw-r--r-- | tests-clar/object/raw/hash.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests-clar/object/raw/hash.c b/tests-clar/object/raw/hash.c index 94be42cdc..f26035e45 100644 --- a/tests-clar/object/raw/hash.c +++ b/tests-clar/object/raw/hash.c @@ -23,25 +23,25 @@ static char *bye_text = "bye world\n"; void test_object_raw_hash__hash_by_blocks(void) { - git_hash_ctx *ctx; + git_hash_ctx ctx; git_oid id1, id2; - cl_assert((ctx = git_hash_ctx_new()) != NULL); + cl_git_pass(git_hash_ctx_init(&ctx)); /* should already be init'd */ - cl_git_pass(git_hash_update(ctx, hello_text, strlen(hello_text))); - cl_git_pass(git_hash_final(&id2, ctx)); + cl_git_pass(git_hash_update(&ctx, hello_text, strlen(hello_text))); + cl_git_pass(git_hash_final(&id2, &ctx)); cl_git_pass(git_oid_fromstr(&id1, hello_id)); cl_assert(git_oid_cmp(&id1, &id2) == 0); /* reinit should permit reuse */ - cl_git_pass(git_hash_init(ctx)); - cl_git_pass(git_hash_update(ctx, bye_text, strlen(bye_text))); - cl_git_pass(git_hash_final(&id2, ctx)); + cl_git_pass(git_hash_init(&ctx)); + cl_git_pass(git_hash_update(&ctx, bye_text, strlen(bye_text))); + cl_git_pass(git_hash_final(&id2, &ctx)); cl_git_pass(git_oid_fromstr(&id1, bye_id)); cl_assert(git_oid_cmp(&id1, &id2) == 0); - git_hash_ctx_free(ctx); + git_hash_ctx_cleanup(&ctx); } void test_object_raw_hash__hash_buffer_in_single_call(void) |
