1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/src/document/docdata.h
Witold Filipczyk 1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00

29 lines
665 B
C

#ifndef EL__DOCUMENT_DOCDATA_H
#define EL__DOCUMENT_DOCDATA_H
#include "document/document.h"
#include "util/memory.h"
#ifdef __cplusplus
extern "C" {
#endif
#define LINES_GRANULARITY 0x7F
#define LINE_GRANULARITY 0x0F
#define LINK_GRANULARITY 0x7F
#define ALIGN_LINES(x, o, n) mem_align_alloc(x, o, n, LINES_GRANULARITY)
#define ALIGN_LINE(x, o, n) mem_align_alloc(x, o, n, LINE_GRANULARITY)
#define ALIGN_LINK(x, o, n) mem_align_alloc(x, o, n, LINK_GRANULARITY)
#define realloc_points(link, size) \
mem_align_alloc(&(link)->points, (link)->npoints, size, 0)
struct line *realloc_lines(struct document *document, int y);
#ifdef __cplusplus
}
#endif
#endif