Move <string.h> fragment to swigfragments
This commit is contained in:
parent
feeb2516ae
commit
c041ac6d1c
6 changed files with 14 additions and 6 deletions
|
|
@ -11,6 +11,7 @@ below.
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#define OTHERLAND_MSG "Little message from the safe world."
|
#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."
|
#define CPLUSPLUS_MSG "A message from the deep dark world of C++, where anything is possible."
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
#include <string.h>
|
||||||
struct A {};
|
struct A {};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@
|
||||||
%varargs(int mode = 0) Foo::statictest(const char*fmt, ...);
|
%varargs(int mode = 0) Foo::statictest(const char*fmt, ...);
|
||||||
%varargs(2, int mode = 0) test_plenty(const char*fmt, ...);
|
%varargs(2, int mode = 0) test_plenty(const char*fmt, ...);
|
||||||
|
|
||||||
|
%{
|
||||||
|
#include <string.h>
|
||||||
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
char *test(const char *fmt, ...) {
|
char *test(const char *fmt, ...) {
|
||||||
return (char *) fmt;
|
return (char *) fmt;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
* SWIG library file containing macros for manipulating raw C data as strings.
|
* SWIG library file containing macros for manipulating raw C data as strings.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
%include <swigfragments.swg>
|
||||||
|
|
||||||
%{
|
%{
|
||||||
typedef struct SWIGCDATA {
|
typedef struct SWIGCDATA {
|
||||||
char *data;
|
char *data;
|
||||||
|
|
|
||||||
|
|
@ -442,10 +442,6 @@ namespace std {
|
||||||
* Default char * and C array typemaps
|
* Default char * and C array typemaps
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
%fragment("<string.h>", "runtime") %{
|
|
||||||
#include <string.h>
|
|
||||||
%}
|
|
||||||
|
|
||||||
/* Set up the typemap for handling new return strings */
|
/* Set up the typemap for handling new return strings */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%fragment("<string.h>", "header") %{
|
||||||
|
#include <string.h>
|
||||||
|
%}
|
||||||
|
|
||||||
%fragment("<stddef.h>", "header") %{
|
%fragment("<stddef.h>", "header") %{
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue