summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorsynergydev <synergye@codefi.re>2013-10-20 23:34:58 (GMT)
committersynergy dev <synergye@codefi.re>2013-12-06 18:30:23 (GMT)
commit2b996f62ac23e6f77d24f6d5809262fd2d00c726 (patch)
tree3c19135533e9842dcb0d9e8b8dbc0bdae3aa6a2d /jni
parentb269d503712d9f214297ef7dcf5991745626b675 (diff)
downloadandroid_packages_apps_Gallery2-2b996f62ac23e6f77d24f6d5809262fd2d00c726.zip
android_packages_apps_Gallery2-2b996f62ac23e6f77d24f6d5809262fd2d00c726.tar.gz
android_packages_apps_Gallery2-2b996f62ac23e6f77d24f6d5809262fd2d00c726.tar.bz2
jni: fix C99 inline linking
Clang builds C code according to the C99 standard, which provides different semantics for the inline keyword than GCC's default behavior. This is the correct behavior without any gnu extensions. See here: http://clang.llvm.org/compatibility.html#inline Change-Id: I831a5189e027a2f0cb3c7d9cda56bd3701502863
Diffstat (limited to 'jni')
-rw-r--r--jni/filters/geometry.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/jni/filters/geometry.c b/jni/filters/geometry.c
index a0b5aaa..b308213 100644
--- a/jni/filters/geometry.c
+++ b/jni/filters/geometry.c
@@ -17,7 +17,7 @@
#include "filters.h"
#include <stdio.h>
-__inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
//Vertical
size_t cpy_bytes = sizeof(char) * 4;
int width = cpy_bytes * srcWidth;
@@ -31,7 +31,7 @@ __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char *
}
}
-__inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
//Horizontal
size_t cpy_bytes = sizeof(char) * 4;
int width = cpy_bytes * srcWidth;
@@ -48,7 +48,7 @@ __inline__ void flipHorizontal(char * source, int srcWidth, int srcHeight, char
}
}
-__inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
int horiz = (flip & 1) != 0;
int vert = (flip & 2) != 0;
if (horiz && vert){
@@ -70,7 +70,7 @@ __inline__ void flip_fun(int flip, char * source, int srcWidth, int srcHeight, c
}
//90 CCW (opposite of what's used in UI?)
-__inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
size_t cpy_bytes = sizeof(char) * 4;
int width = cpy_bytes * srcWidth;
int length = srcHeight;
@@ -86,17 +86,17 @@ __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char * dest
}
}
-__inline__ void rotate180(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void rotate180(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
flip_fun(3, source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
}
-__inline__ void rotate270(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void rotate270(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
rotate90(source, srcWidth, srcHeight, destination, dstWidth, dstHeight);
flip_fun(3, destination, dstWidth, dstHeight, destination, dstWidth, dstHeight);
}
// rotate == 1 is 90 degrees, 2 is 180, 3 is 270 (positive is CCW).
-__inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
+static __inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
switch( rotate )
{
case 1:
@@ -113,7 +113,7 @@ __inline__ void rotate_fun(int rotate, char * source, int srcWidth, int srcHeigh
}
}
-__inline__ void crop(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight, int offsetWidth, int offsetHeight){
+static __inline__ void crop(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight, int offsetWidth, int offsetHeight){
size_t cpy_bytes = sizeof(char) * 4;
int row_width = cpy_bytes * srcWidth;
int new_row_width = cpy_bytes * dstWidth;