- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- repo->address = address;
-}
-
-void repository_add_phone(Gom_ctxt ctxt, char *phone)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo) {
- int i = 0;
- while (i<2 && repo->phone[i]) i++;
- if (! repo->phone[i]) {
- repo->phone[i] = strdup(phone);
- if (! repo->phone[i]) MEMORY_ERROR;
- }
- }
-}
-
-void repository_add_note(Gom_ctxt ctxt, struct note_sub* note)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- LINK_CHAIN_ELT(note_sub, repo->note, note);
-}
-
-void repository_add_user_ref(Gom_ctxt ctxt, struct user_ref_number* ref)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- LINK_CHAIN_ELT(user_ref_number, repo->ref, ref);
-}
-
-void repository_set_record_id(Gom_ctxt ctxt, char *rin)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo) {
- repo->record_id = strdup(rin);
- if (! repo->record_id) MEMORY_ERROR;
+ if (obj) {
+ UNREFALLFUNC(address)(obj->address);
+ UNREFALLFUNC(note_sub)(obj->note);
+ UNREFALLFUNC(user_ref_number)(obj->ref);
+ UNREFALLFUNC(change_date)(obj->change_date);
+ UNREFALLFUNC(user_data)(obj->extra);