1 diff -ur rpm-5.4.15/python/spec-py.c rpm-5.4.15-pyspec/python/spec-py.c
2 --- rpm-5.4.15/python/spec-py.c 2016-05-11 21:38:24.970137574 +0200
3 +++ rpm-5.4.15-pyspec/python/spec-py.c 2016-05-10 22:47:04.748529737 +0200
6 #define _MACRO_INTERNAL
8 +#define _RPMTAG_INTERNAL
9 +#include "header_internal.h" /* XXX HEADERFLAG_ALLOCATED */
10 +#include "header-py.h"
19 +spec_get_headers(specObject *s)
22 + PyObject *headerList;
27 + headerList = PyList_New(0);
31 + spec = specFromSpec(s);
32 + if ( spec != NULL) {
33 + package = spec->packages;
35 + while (package != NULL) {
36 + header = package->header;
38 + PyList_Append(headerList, (PyObject *) hdr_Wrap(header));
39 + package = package->next;
43 + return PyList_AsTuple(headerList);
48 /*@unchecked@*/ /*@observer@*/
50 {"clean", (PyCFunction) spec_get_clean, METH_VARARGS, NULL },
51 {"buildRoot", (PyCFunction) spec_get_buildroot, METH_VARARGS, NULL },
52 {"macros", (PyCFunction) spec_get_macros, METH_VARARGS, NULL },
53 + {"headers", (PyCFunction) spec_get_headers, METH_VARARGS, NULL },