summaryrefslogtreecommitdiff
path: root/Lib/cdata.i
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-02-01 14:05:17 +1300
committerGitHub <noreply@github.com>2022-02-01 14:05:17 +1300
commit3e019977c580fdfbb29b7ae60bed09358e9335e4 (patch)
treec5e6abbcaff15427017f8c1759b725dd2921f252 /Lib/cdata.i
parentb66926b98db667d07155d76f12b085ab0523c379 (diff)
parentc041ac6d1cda407baa338bd016c0a68f2f0c6834 (diff)
downloadswig-3e019977c580fdfbb29b7ae60bed09358e9335e4.tar.gz
Merge pull request #1398 from swig-fortran/missing-includes
Add missing includes to library and test cases
Diffstat (limited to 'Lib/cdata.i')
-rw-r--r--Lib/cdata.i6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/cdata.i b/Lib/cdata.i
index cd1526643..8736de1c2 100644
--- a/Lib/cdata.i
+++ b/Lib/cdata.i
@@ -4,6 +4,8 @@
* SWIG library file containing macros for manipulating raw C data as strings.
* ----------------------------------------------------------------------------- */
+%include <swigfragments.swg>
+
%{
typedef struct SWIGCDATA {
char *data;
@@ -60,7 +62,7 @@ static jbyteArray SWIG_JavaArrayOutCDATA(JNIEnv *jenv, char *result, jsize sz) {
/* -----------------------------------------------------------------------------
- * %cdata(TYPE [, NAME])
+ * %cdata(TYPE [, NAME])
*
* Convert raw C data to a binary string.
* ----------------------------------------------------------------------------- */
@@ -99,6 +101,8 @@ SWIGCDATA cdata_##NAME(TYPE *ptr, int nelements);
%cdata(void);
+%fragment("<string.h>");
+
/* Memory move function. Due to multi-argument typemaps this appears to be wrapped as
void memmove(void *data, const char *s); */
void memmove(void *data, const void *indata, int inlen);