Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 384875 | Differences between
and this patch

Collapse All | Expand All

(-)luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc (+27 lines)
Lines 23-28 static const char _svn_version[] = Link Here
23
    "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
23
    "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
24
24
25
#include "image/epdf.h"
25
#include "image/epdf.h"
26
#include <poppler/cpp/poppler-version.h>
26
27
27
// define DEBUG
28
// define DEBUG
28
29
Lines 89-95 new_poppler_userdata(AnnotBorder); Link Here
89
new_poppler_userdata(Annots);
90
new_poppler_userdata(Annots);
90
new_poppler_userdata(Array);
91
new_poppler_userdata(Array);
91
new_poppler_userdata(Catalog);
92
new_poppler_userdata(Catalog);
93
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
94
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
92
new_poppler_userdata(EmbFile);
95
new_poppler_userdata(EmbFile);
96
#endif
93
new_poppler_userdata(Dict);
97
new_poppler_userdata(Dict);
94
//new_poppler_userdata(GooString);
98
//new_poppler_userdata(GooString);
95
new_poppler_userdata(LinkDest);
99
new_poppler_userdata(LinkDest);
Lines 393-399 static int m_Annot__gc(lua_State * L) Link Here
393
    printf("\n===== Annot GC ===== uin=<%p>\n", uin);
397
    printf("\n===== Annot GC ===== uin=<%p>\n", uin);
394
#endif
398
#endif
395
    if (uin->atype == ALLOC_LEPDF)
399
    if (uin->atype == ALLOC_LEPDF)
400
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
396
        delete(Annot *) uin->d;
401
        delete(Annot *) uin->d;
402
#else
403
        ((Annot *) uin->d)->decRefCnt();
404
#endif
397
    return 0;
405
    return 0;
398
}
406
}
399
407
Lines 410-415 static const struct luaL_Reg Annot_m[] = Link Here
410
//**********************************************************************
418
//**********************************************************************
411
// AnnotBorderStyle
419
// AnnotBorderStyle
412
420
421
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
422
413
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
423
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
414
424
415
m_poppler__tostring(AnnotBorderStyle);
425
m_poppler__tostring(AnnotBorderStyle);
Lines 435-440 static const struct luaL_Reg AnnotBorder Link Here
435
    {NULL, NULL}                // sentinel
445
    {NULL, NULL}                // sentinel
436
};
446
};
437
447
448
#endif
449
438
//**********************************************************************
450
//**********************************************************************
439
// Annots
451
// Annots
440
452
Lines 684-689 static int m_Catalog_findDest(lua_State Link Here
684
m_poppler_get_poppler(Catalog, Object, getDests);
696
m_poppler_get_poppler(Catalog, Object, getDests);
685
m_poppler_get_INT(Catalog, numEmbeddedFiles);
697
m_poppler_get_INT(Catalog, numEmbeddedFiles);
686
698
699
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
700
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
687
static int m_Catalog_embeddedFile(lua_State * L)
701
static int m_Catalog_embeddedFile(lua_State * L)
688
{
702
{
689
    EmbFile *ef;
703
    EmbFile *ef;
Lines 707-712 static int m_Catalog_embeddedFile(lua_St Link Here
707
        lua_pushnil(L);
721
        lua_pushnil(L);
708
    return 1;
722
    return 1;
709
}
723
}
724
#endif
710
725
711
m_poppler_get_INT(Catalog, numJS);
726
m_poppler_get_INT(Catalog, numJS);
712
727
Lines 749-755 static const struct luaL_Reg Catalog_m[] Link Here
749
    {"findDest", m_Catalog_findDest},
764
    {"findDest", m_Catalog_findDest},
750
    {"getDests", m_Catalog_getDests},
765
    {"getDests", m_Catalog_getDests},
751
    {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
766
    {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
767
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
752
    {"embeddedFile", m_Catalog_embeddedFile},
768
    {"embeddedFile", m_Catalog_embeddedFile},
769
#endif
753
    {"numJS", m_Catalog_numJS},
770
    {"numJS", m_Catalog_numJS},
754
    {"getJS", m_Catalog_getJS},
771
    {"getJS", m_Catalog_getJS},
755
    {"getOutline", m_Catalog_getOutline},
772
    {"getOutline", m_Catalog_getOutline},
Lines 761-766 static const struct luaL_Reg Catalog_m[] Link Here
761
//**********************************************************************
778
//**********************************************************************
762
// EmbFile
779
// EmbFile
763
780
781
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
782
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
783
764
m_poppler_get_GOOSTRING(EmbFile, name);
784
m_poppler_get_GOOSTRING(EmbFile, name);
765
m_poppler_get_GOOSTRING(EmbFile, description);
785
m_poppler_get_GOOSTRING(EmbFile, description);
766
m_poppler_get_INT(EmbFile, size);
786
m_poppler_get_INT(EmbFile, size);
Lines 801-806 static const struct luaL_Reg EmbFile_m[] Link Here
801
    {NULL, NULL}                // sentinel
821
    {NULL, NULL}                // sentinel
802
};
822
};
803
823
824
#endif
825
804
//**********************************************************************
826
//**********************************************************************
805
// Dict
827
// Dict
806
828
Lines 2683-2693 int luaopen_epdf(lua_State * L) Link Here
2683
{
2705
{
2684
    register_meta(Annot);
2706
    register_meta(Annot);
2685
    // TODO register_meta(AnnotBorder);
2707
    // TODO register_meta(AnnotBorder);
2708
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
2686
    register_meta(AnnotBorderStyle);
2709
    register_meta(AnnotBorderStyle);
2710
#endif
2687
    register_meta(Annots);
2711
    register_meta(Annots);
2688
    register_meta(Array);
2712
    register_meta(Array);
2689
    register_meta(Catalog);
2713
    register_meta(Catalog);
2714
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
2715
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
2690
    register_meta(EmbFile);
2716
    register_meta(EmbFile);
2717
#endif
2691
    register_meta(Dict);
2718
    register_meta(Dict);
2692
    register_meta(GooString);
2719
    register_meta(GooString);
2693
    register_meta(LinkDest);
2720
    register_meta(LinkDest);

Return to bug 384875