summaryrefslogtreecommitdiffstats
path: root/libraries/jbig2enc/jbig2enc-2019.09.08-leptonica-1.83.0.patch
blob: f80d41ccdd1f12d76f358bb2f123c5998bde4671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- a/src/jbig2.cc
+++ b/src/jbig2.cc
@@ -29,6 +29,8 @@
 #endif
 
 #include <leptonica/allheaders.h>
+#include <leptonica/array_internal.h>
+#include <leptonica/pix_internal.h>
 
 #include "jbig2enc.h"
 
--- a/src/jbig2enc.cc
+++ b/src/jbig2enc.cc
@@ -24,6 +24,8 @@
 #include <string.h>
 
 #include <leptonica/allheaders.h>
+#include <leptonica/array_internal.h>
+#include <leptonica/pix_internal.h>
 
 #include <math.h>
 #if defined(sun)
@@ -206,7 +208,7 @@
         numaSetValue(ctx->classer->naclass, i, new_representant);
       }
     }
-    pixChangeRefcount(ctx->classer->pixat->pix[new_representant],pixGetRefcount(ctx->classer->pixat->pix[second_template]));
+    ctx->classer->pixat->pix[new_representant]->refcount += ctx->classer->pixat->pix[second_template]->refcount;
   }
   return 0;
 }
--- a/src/jbig2sym.cc
+++ b/src/jbig2sym.cc
@@ -29,6 +29,8 @@
 #include <stdio.h>
 
 #include <leptonica/allheaders.h>
+#include <leptonica/array_internal.h>
+#include <leptonica/pix_internal.h>
 
 #include <math.h>