Marcelo Matus
e0adc5af01
Fragments can now be "type especialized", as the typemaps. The
...
syntax is as follows
%fragment("name","header") { /* an old fragment */ }
%fragment("name" {Type}, "header") { /* the fragment is type dependent */}
Now fragments can also be used inside templates:
template <class T>
struct A {
%fragment("incode"{A<T>},"header") {
/* 'incode' especialized fragment */
}
%typemap(in,fragment="incode"{A<T>}) {
/*
here we use the 'type especialized' fragment
"incode"{A<T> }
*/
}
};
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:36:06 +00:00
Marcelo Matus
a95c468076
Using the unused 'Swig_string_mangle' method to
...
implement the #@ preprocessor mangling
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5751 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:27:02 +00:00
William S Fulton
06b079936c
bool patch code removal
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5729 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-20 22:52:49 +00:00
Dave Beazley
a1ef09aa22
Removed 'bool' datatype. Not portable. Please don't use.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5719 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 00:20:12 +00:00
Marcelo Matus
7fef280ae0
Added the ref/unref 'recursive' featues. See refcount.i for details
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5705 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 09:21:36 +00:00
Marcelo Matus
2a573e9a08
Keep the old non-resolved type str and add the fully
...
resolved one if is needed.
Add examples showing the problem with SWIG_TypeQuery
and template+typedef and the old type str, and how
it works now.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 08:37:30 +00:00
Marcelo Matus
d3caa4eefc
Fixes for SWIG_TypeQuery and templates/typedefs,
...
before the swig_type_info fields 'str' and 'name'
where not consistent, one was fully resolved (name),
the other not, therefore
typedef int Int;
template <class C> struct Class {};
SWIG_TypeQuery($descriptor(Class<int>*))
wasn't necessary the same that
typedef int Int;
template <class C> struct Class {};
SWIG_TypeQuery("Class<int> *")
the problem was visible only when the latter form was used,
like in a static auxiliar function outside a typemap.
also, relax type name comparison with blanks, ie
SWIG_TypeQuery("Class<int> *") := SWIG_TypeQuery("Class<int > *")
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5703 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 03:42:38 +00:00
Logan Johnson
4328d45859
Make sure that all fields of the swig_type_info struct are initialized
...
to something, to avoid numerous compiler warnings.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-06 17:44:13 +00:00
Marcelo Matus
6dceec6fdb
Simple patch to allow fragments to include other fragments:
...
%fragment("Hello","header") "..."
%fragment("Hi","header",fragment="Hello") "..."
the latter fragment will include the first one if is invoked.
more than one fragment can be included at the time, just
keep adding fragment="f1",fragment="f2", etc.
this is used to emulate typemaps reuse, where all the
reusable typemap code is put in a fragment static method,
and then it can be included from another fragment typemap
as needed.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-27 23:39:35 +00:00
Marcelo Matus
c083368322
fix expansion for templates, ie from Type<(int)> to Type<int>
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5686 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-25 09:22:35 +00:00
William S Fulton
11561b2499
Eric Sunshine patch - Mods to work on NextStep
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5674 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 22:42:18 +00:00
William S Fulton
e810800783
forte warning fixes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5663 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 21:27:43 +00:00
William S Fulton
b0df32dd1a
Various warning fixes for .NET 2003 cl /W4 to work barring one warning and for gcc -ansi -Wall -pedantic to be warning free:
...
const fixes and function prototype declarations matching the definition etc
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 22:46:07 +00:00
Marcelo Matus
bd9aa0c7c9
- Normalize the 'Swig_error' calls and formats, before some
...
of the strings start like "Error. XXX", others like "XXX".
The format is now defined in 'error.c:Swig_error_msg_format()'.
- Normalize the multiline error/warning messages to correctly
use -Fformat definition.
- Centralize the error/warning format definitions in
'error.c:Swig_error_msg_format()'.
- Fix a minor error in cpp.c, that after finding an error, still
was emitting a redefined macro, producing duplicated error/warning
messages in parser.y.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 08:33:12 +00:00
William S Fulton
6c61bbf852
Warning and error messages output is selectable via commandline options
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5613 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-10 00:08:18 +00:00
William S Fulton
c00aaf0f5b
Moved non static function declarations from source files into header files
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5602 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-28 21:48:39 +00:00
William S Fulton
2b472c5aa6
Fix so that Windows paths are displayed correctly when reporting errors.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5600 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-28 21:38:58 +00:00
Dave Beazley
d62e0c9800
Fixed casting problem with references to arrays in gcc-3.3 (and maybe other versions).
...
I'm not sure if this is a gcc bug or a SWIG bug. However, the patch makes the
arrayref.i test work on my machine.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-28 19:06:35 +00:00
Marcelo Matus
eed2349c8f
Fixed not '0' terminated string, that could result in a getting a bad error code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-27 00:11:18 +00:00
Dave Beazley
a1c8cc4283
Fixed infinite recursion bug (maybe)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-26 20:56:44 +00:00
Dave Beazley
d1345878e1
Added Swig_push_directory() and Swig_pop_directory()
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5297 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-11 20:16:35 +00:00
Dave Beazley
114a8edfbb
Added functions to support preprocessor enhancement.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5296 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-11 20:16:11 +00:00
Dave Beazley
61088dcbe2
Eliminate compiler warning.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5217 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-10-31 17:48:02 +00:00
Dave Beazley
c65d99b765
Eliminated compiler warning.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5216 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-10-31 17:47:53 +00:00
William S Fulton
45e7a32a0b
Fixes to comply with with ISO/IEC 14882:1998(E) 17.4.3.1.2 (symbol names)
...
Symbols in the generated director code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-23 21:26:31 +00:00
William S Fulton
9da574aae9
__DIRECTOR__ renamed Swig::Director
...
SWIG_DIRECTOR_EXCEPTION renamed Swig::DirectorException (similarly for derived classes)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5138 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-22 20:13:42 +00:00
Logan Johnson
ce97184374
Fixed some problems in Swig_ConstructorToFunction() for the case where
...
the parameter list (parms) is NULL.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5121 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-19 18:20:16 +00:00
Dave Beazley
8ae4c60d39
Major refactoring of DOH List/Hash iterators. See CHANGES
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5101 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-11 20:26:57 +00:00
Matthias Köppe
bbbff3e5e7
Remove prototypes for the deleted functions SwigType_reset_scopes,
...
SwigType_set_scope_name, Swig_debug_emit, Swig_typemap_lookup_multi.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5097 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-09 12:42:20 +00:00
William S Fulton
a562a53bcb
Java directors implementation contributed by Scott Michel.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5076 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-04 23:26:29 +00:00
Dave Beazley
175a8c21cf
misc cleanup.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-01 17:03:29 +00:00
Mark Rose
ec6251e86d
Abstract directors and typemap fixes.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5024 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-30 05:03:34 +00:00
Dave Beazley
2ff7dfb6c1
Work on embedded typemaps. Highly experimental--probably broken
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5007 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-17 21:19:27 +00:00
Dave Beazley
d447d2fd5e
Fixed [ 775989 ] numeric template parameters
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4994 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-11 19:24:31 +00:00
William S Fulton
7841619e84
Fix for windows. Files were not being generated into the correct directories if the Windows path separator was used. The Unix separator '/' had to be used.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-07 17:24:54 +00:00
William S Fulton
d038325759
Changed Swig_typemap_attach_kwargs to have global scope
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-29 21:54:44 +00:00
Matthias Köppe
ac6e7eaa44
(tmop_name): Fix for the case of a String *op.
...
This fixes the Guile testcase pointer_in_out (and others).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4913 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-18 13:18:01 +00:00
Logan Johnson
bd35c8a679
*** empty log message ***
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4864 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-05 17:02:45 +00:00
Logan Johnson
22d7c12c26
Broke up Swig_typemap_attach_parms() a bit for readability.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-04 23:29:12 +00:00
Dave Beazley
fcc42fa5a6
Fixes to default typemap handling of arrays.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-29 18:28:46 +00:00
Dave Beazley
6c5a5ac719
Changes to default type handling to disambiguate dimensionless [] and
...
dimensioned arrays [ANY].
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-29 18:28:31 +00:00
Dave Beazley
7c56de80f3
*** empty log message ***
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4826 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-28 21:35:12 +00:00
Dave Beazley
c7480b9897
Fixed reference/pointer typedef problem.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4825 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-28 21:34:54 +00:00
Dave Beazley
1371a4ed5e
Minor tweak.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-30 17:42:24 +00:00
Logan Johnson
f929918ea6
*** empty log message ***
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4723 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-28 22:36:11 +00:00
Dave Beazley
5959a7dc3a
Fixed [ 723471 ] Wrapper_print() fails with preprocessor directives
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4718 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-28 19:29:49 +00:00
Dave Beazley
1738d4e5c1
Fixed nested namespace resolution problem.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-23 17:59:06 +00:00
Dave Beazley
2cfb9272f8
Minor fix to SwigType_isclass()
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-18 21:03:06 +00:00
Dave Beazley
a909372d29
Some type system cleanup. A modest performance improvement as well.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4665 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-03 19:22:57 +00:00
Dave Beazley
1aefd191bf
Memory diagnostics. Huge memory leak cleanup related to templates
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-27 23:17:27 +00:00