It seems a bit strange for procheader_get_header_from_msginfo()
to require a non-const header string argument, though.
{
int retval;
const char *header_str;
{
int retval;
const char *header_str;
MsgInfo *msginfo;
gchar header_content[HEADER_CONTENT_SIZE];
MsgInfo *msginfo;
gchar header_content[HEADER_CONTENT_SIZE];
msginfo = ((clawsmail_MessageInfoObject*)self)->msginfo;
msginfo = ((clawsmail_MessageInfoObject*)self)->msginfo;
- if(procheader_get_header_from_msginfo(msginfo, header_content, HEADER_CONTENT_SIZE, header_str) == 0) {
+ header_str_dup = g_strdup(header_str);
+ retval = procheader_get_header_from_msginfo(msginfo, header_content, HEADER_CONTENT_SIZE, header_str);
+ g_free(header_str_dup);
+ if(retval == 0) {
PyObject *header_content_object;
gchar *content_start;
PyObject *header_content_object;
gchar *content_start;