Move <string.h> fragment to swigfragments

This commit is contained in:
Seth R Johnson 2018-03-23 15:04:00 -04:00
commit c041ac6d1c
6 changed files with 14 additions and 6 deletions

View file

@ -11,6 +11,7 @@ below.
%{
#include <stdio.h>
#include <string.h>
#define OTHERLAND_MSG "Little message from the safe world."
#define CPLUSPLUS_MSG "A message from the deep dark world of C++, where anything is possible."
@ -150,11 +151,11 @@ const char global_const_char_array2[sizeof(CPLUSPLUS_MSG)+1] = CPLUSPLUS_MSG;
%inline {
struct Formatpos;
struct OBFormat;
static int GetNextFormat(Formatpos& itr, const char*& str,OBFormat*& pFormat) {
return 0;
}
}

View file

@ -13,6 +13,7 @@
%}
%{
#include <string.h>
struct A {};
%}

View file

@ -7,6 +7,10 @@
%varargs(int mode = 0) Foo::statictest(const char*fmt, ...);
%varargs(2, int mode = 0) test_plenty(const char*fmt, ...);
%{
#include <string.h>
%}
%inline %{
char *test(const char *fmt, ...) {
return (char *) fmt;