dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove debug print statement.
[gedcom-parse.git]
/
gom
/
place.c
diff --git
a/gom/place.c
b/gom/place.c
index 8ceb152b94c6fcfc89aed9cee9a7710feba8f1d5..38ff377481d2330b1caef10a37bceac70addb1b4 100644
(file)
--- a/
gom/place.c
+++ b/
gom/place.c
@@
-41,11
+41,8
@@
Gedcom_ctxt sub_place_start(_ELT_PARAMS_)
if (! ctxt)
NO_CONTEXT;
else {
if (! ctxt)
NO_CONTEXT;
else {
- struct place *place = (struct place *)malloc(sizeof(struct place));
- if (! place)
- MEMORY_ERROR;
- else {
- memset (place, 0, sizeof(struct place));
+ struct place *place = SUB_MAKEFUNC(place)();
+ if (place) {
place->value = strdup(GEDCOM_STRING(parsed_value));
if (!place->value) {
place->value = strdup(GEDCOM_STRING(parsed_value));
if (!place->value) {
@@
-74,6
+71,10
@@
Gedcom_ctxt sub_place_start(_ELT_PARAMS_)
return (Gedcom_ctxt)result;
}
return (Gedcom_ctxt)result;
}
+DEFINE_SUB_MAKEFUNC(place)
+DEFINE_SUB_SETFUNC(place)
+DEFINE_SUB_DELETEFUNC(place)
+
DEFINE_STRING_CB(place, sub_place_form_start, place_hierarchy)
DEFINE_ADDFUNC2(place, source_citation, citation)
DEFINE_STRING_CB(place, sub_place_form_start, place_hierarchy)
DEFINE_ADDFUNC2(place, source_citation, citation)
@@
-87,6
+88,15
@@
void place_subscribe()
sub_place_form_start, def_elt_end);
}
sub_place_form_start, def_elt_end);
}
+void UNREFALLFUNC(place)(struct place* obj)
+{
+ if (obj) {
+ UNREFALLFUNC(source_citation)(obj->citation);
+ UNREFALLFUNC(note_sub)(obj->note);
+ UNREFALLFUNC(user_data)(obj->extra);
+ }
+}
+
void CLEANFUNC(place)(struct place* place)
{
if (place) {
void CLEANFUNC(place)(struct place* place)
{
if (place) {