Skip to content

Commit 1185fc9

Browse files
committed
Enable tiledb_experimental SWIG generation
Don't filter out the new header in generate_tiledb_jni
1 parent 75110a5 commit 1185fc9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

generate_tiledb_jni

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ fi
6060

6161
# Test if we can find the installed tiledb header
6262
tiledb_header="${prefix_dir}/include/tiledb/tiledb.h"
63+
tiledb_experimental_header="${prefix_dir}/include/tiledb/tiledb_experimental.h"
6364
if [ ! -f ${tiledb_header} ]; then
6465
die "${tiledb_header} not found"
6566
fi
@@ -94,11 +95,11 @@ fi
9495

9596
# define the necessary macro contants
9697
# (removed during preprocessor macro expansion)
97-
g++ -dM -E ${tiledb_header} | grep "#define TILEDB" > swig/tiledb_generated.h ||
98+
g++ -dM -E ${tiledb_header} ${tiledb_experimental_header} | grep "#define TILEDB" > swig/tiledb_generated.h ||
9899
die "could not write ./swig/tiledb_generated.h tmp file"
99100

100101
# remove system headers
101-
awk '!/#\s*include/ || /tiledb_/ {print}' ${tiledb_header} |
102+
awk '!/#\s*include/ || /tiledb_/ {print}' ${tiledb_header} ${tiledb_experimental_header} |
102103
g++ -E -P -nostdinc++ -I "${tiledb_include}" -x c++ - >> swig/tiledb_generated.h ||
103104
die "error generating temp combined swig/tiledb_generated.h header for swig generation"
104105

swig/tiledb.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import java.nio.ByteBuffer;
3838
#include <stdio.h>
3939

4040
#include "tiledb/tiledb.h"
41+
#include "tiledb/tiledb_experimental.h"
4142
#include "tiledb_java_extensions.h"
4243
%}
4344

@@ -138,6 +139,9 @@ import java.nio.ByteBuffer;
138139
%native (uint32ArrayGet) jlongArray uint32ArrayGet(jlong array, jint pos, jint sz);
139140
%native (uint64ArrayGet) jlongArray uint64ArrayGet(jlong array, jint pos, jint sz);
140141

142+
// tiledb_experimental.h
143+
%pointer_functions(tiledb_array_schema_evolution_t*, tiledb_array_schema_evolution_tpp);
144+
141145
%include "tiledb_generated.h"
142146
%include "tiledb_java_extensions.h"
143147

0 commit comments

Comments
 (0)