recurrencePeriodTypeToString and recurrenceWeekendAdjustToString g_strdup only when necessary

... for sql use only. xml use assumes they return a const char*.
This commit is contained in:
Christopher Lam
2023-11-01 21:49:48 +08:00
parent 5937b5d542
commit 12f4233396
3 changed files with 7 additions and 8 deletions

View File

@@ -155,9 +155,9 @@ void recurrenceListNextInstance(const GList *r, const GDate *refDate,
GDate *nextDate);
/* These four functions are only for xml storage, not user presentation. */
gchar *recurrencePeriodTypeToString(PeriodType pt);
const gchar *recurrencePeriodTypeToString(PeriodType pt);
PeriodType recurrencePeriodTypeFromString(const gchar *str);
gchar *recurrenceWeekendAdjustToString(WeekendAdjust wadj);
const gchar *recurrenceWeekendAdjustToString(WeekendAdjust wadj);
WeekendAdjust recurrenceWeekendAdjustFromString(const gchar *str);
/* For debugging. Caller owns the returned string. Not intl. */