Add <string> fragment
Removes <string> include specifically for clang Cuts down on duplicate #include <string> in general
This commit is contained in:
parent
078dbf8d22
commit
bd5c340062
9 changed files with 17 additions and 32 deletions
|
|
@ -8,9 +8,8 @@
|
||||||
|
|
||||||
%apply size_t { std::size_t };
|
%apply size_t { std::size_t };
|
||||||
|
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
#include <string>
|
|
||||||
|
|
||||||
double SwigSvToNumber(SV* sv) {
|
double SwigSvToNumber(SV* sv) {
|
||||||
return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
|
return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,9 +195,8 @@ namespace swig {
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef SWIG_PYTHON_BACKWARD_COMP
|
#ifdef SWIG_PYTHON_BACKWARD_COMP
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
#include <string>
|
|
||||||
|
|
||||||
PyObject* SwigInt_FromBool(bool b) {
|
PyObject* SwigInt_FromBool(bool b) {
|
||||||
return PyInt_FromLong(b ? 1L : 0L);
|
return PyInt_FromLong(b ? 1L : 0L);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,7 @@
|
||||||
%include <std_alloc.i>
|
%include <std_alloc.i>
|
||||||
%include <std_char_traits.i>
|
%include <std_char_traits.i>
|
||||||
|
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
|
||||||
#include <string>
|
|
||||||
%}
|
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
// Common code for supporting the C++ std namespace
|
// Common code for supporting the C++ std namespace
|
||||||
//
|
//
|
||||||
|
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
#include <string>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
%}
|
%}
|
||||||
|
|
@ -73,13 +73,7 @@ namespace std {
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%fragment("StdStringInclude","header") %{
|
%fragment("StdTraitsCommon","header",fragment="<string>") %{
|
||||||
#ifdef __clang__
|
|
||||||
#include <string>
|
|
||||||
#endif
|
|
||||||
%}
|
|
||||||
|
|
||||||
%fragment("StdTraitsCommon","header",fragment="StdStringInclude") %{
|
|
||||||
namespace swig {
|
namespace swig {
|
||||||
template <class Type>
|
template <class Type>
|
||||||
struct noconst_traits {
|
struct noconst_traits {
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@
|
||||||
// is returned
|
// is returned
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
Tcl_Obj* SwigString_FromString(const std::string &s) {
|
Tcl_Obj* SwigString_FromString(const std::string &s) {
|
||||||
return Tcl_NewStringObj(s.data(), (int)s.length());
|
return Tcl_NewStringObj(s.data(), (int)s.length());
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,12 @@
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%fragment("<stddef.h>", "header") %{
|
%fragment("<stddef.h>", "header") %{
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
%}
|
||||||
|
|
||||||
|
%fragment("<string>", "header") %{
|
||||||
|
#include <string>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
|
%fragment("SWIG_isfinite","header",fragment="<math.h>,<float.h>") %{
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
%include <typemaps/std_strings.swg>
|
%include <typemaps/std_strings.swg>
|
||||||
|
|
||||||
%{
|
%fragment("<string>");
|
||||||
#include <string>
|
|
||||||
%}
|
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
%naturalvar string;
|
%naturalvar string;
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
#include <string>
|
|
||||||
%}
|
%}
|
||||||
|
%fragment("<string>");
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,18 +21,12 @@
|
||||||
// Common code for supporting the STD C++ namespace
|
// Common code for supporting the STD C++ namespace
|
||||||
//
|
//
|
||||||
|
|
||||||
|
%fragment("<string>");
|
||||||
%{
|
%{
|
||||||
#include <string>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%fragment("StdStringInclude","header") %{
|
%fragment("Traits","header",fragment="<string>")
|
||||||
#ifdef __clang__
|
|
||||||
#include <string>
|
|
||||||
#endif
|
|
||||||
%}
|
|
||||||
|
|
||||||
%fragment("Traits","header",fragment="StdStringInclude")
|
|
||||||
{
|
{
|
||||||
namespace swig {
|
namespace swig {
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue