Skip to content

Commit 0dc3534

Browse files
committed
repository: use TypedData when setting owners
1 parent c1e5508 commit 0dc3534

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ext/rugged/rugged_repo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ VALUE rb_cRuggedOdbObject;
3434

3535
static ID id_call;
3636

37+
extern const rb_data_type_t rugged_config_type;
3738
extern const rb_data_type_t rugged_diff_type;
3839
extern const rb_data_type_t rugged_index_type;
3940
const rb_data_type_t rugged_repository_type;
@@ -644,7 +645,7 @@ static VALUE rb_git_repo_clone_at(int argc, VALUE *argv, VALUE klass)
644645
rb_raise(rb_eRuntimeError, \
645646
"The given object is already owned by another repository"); \
646647
TypedData_Get_Struct(self, git_repository, &rugged_repository_type, repo); \
647-
Data_Get_Struct(rb_data, git_##_object, data); \
648+
TypedData_Get_Struct(rb_data, git_##_object, &rugged_##_object##_type, data); \
648649
git_repository_set_##_object(repo, data); \
649650
rb_old_data = rb_iv_get(self, "@" #_object); \
650651
if (!NIL_P(rb_old_data)) rugged_set_owner(rb_old_data, Qnil); \

0 commit comments

Comments
 (0)