Miklos Vajna
8da18d336e
PHP: Optimize the previous commit a bit.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11594 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-16 21:47:24 +00:00
Miklos Vajna
b5c49c20fd
PHP: fix for the valuewrapper_base testcase
...
The problem is the following: before director support, the return class
type of a function was hardwired. That was bad, as factory functions
wanted to instantiate abstract classes, so we switched to detecting the
class type based on the PHP resource type. That was good, but broke the
case when for example
%template(make_Interface_BP) make<Interface_<BinaryPolarization> >;
was used, as the cheap parser had no idea how to turn
'Interface_T_oss__BinaryPolarization_t' to 'make_Interface_BP'.
This patch still uses the resource type detection, but in case that
would result in a non-existing class, we just use the hardwired name.
NOTE: This still does not fix the case when abstract classes are used
with templates.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11593 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-16 21:44:05 +00:00
William S Fulton
c7b7078dd0
Fix classes not being added into Java method's throws clause when %catches is used
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11584 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-16 00:04:29 +00:00
William S Fulton
4516c1d3f3
Fix exception handling when %catches is used in C#
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 23:22:20 +00:00
Olly Betts
f3d0ebbf18
Refactor the recent support for wrapping static member variables for PHP5 so it
...
works for static members which are themselves classes. With this and the previous
patch, li_std_string now passes and all other tests pass/fail as before.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11578 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 05:33:05 +00:00
Xavier Delacour
b81cb3bff9
try not to require -api option in octave
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 01:19:28 +00:00
Olly Betts
ba29cea2b5
Minor cleanups.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11571 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 17:01:20 +00:00
Olly Betts
57017bd6bc
[PHP] PHP5 now wraps static member variables as documented.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11570 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 16:22:15 +00:00
Olly Betts
f4e3444ae3
Use module name instead of hardcoded "example" in __get().
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11567 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 09:44:15 +00:00
Olly Betts
e125ce326d
If $c would be used as a parameter name, rename it to $c_ to avoid issues
...
if call-time pass-by-reference is enabled and used.
Use $c instead of $class to keep down the number of "reserved" parameter
names.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 08:04:21 +00:00
Olly Betts
e068305125
If there's no prefix, special case to avoid prepending an empty string.
...
Don't calculate $class in the stdClass case when we don't need it.
Eliminate an unnecessary else.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 07:53:38 +00:00
Miklos Vajna
889b156afd
PHP: fix for the extend_template testcase
...
The fix is not to handle a %template as a rename by reading the class'
sym:name attribute instead of the ctor's name attribute.
This has been broken in r11510.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-12 11:18:58 +00:00
Olly Betts
741b90763b
Fix to work for classes which aren't called "Foo"...
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-11 14:42:03 +00:00
Olly Betts
37b9370344
Eliminate space before "function" when there's no access specifier (just a
...
cosmetic tweak).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11530 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-11 14:40:51 +00:00
Miklos Vajna
b61f9da6e6
PHP: fix for the template_ref_type testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11528 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-11 10:19:04 +00:00
William S Fulton
136bd5175a
Python and Tcl - improve error message for missing constructor when the reason is because the class is abstract.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-08 22:56:10 +00:00
Miklos Vajna
486419b271
PHP: Skip the Foo:: prefix when detecting ctor renames
...
This fixes a few testcases (like the mixed_types one) I broke in the
previous commit.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-06 13:16:50 +00:00
Miklos Vajna
09b20003fb
PHP: fix for the overload_rename testcase
...
Previously we just had two __construct function which resulted in a
parse error. Now we create a new factory method for the renamed ctor.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-06 12:27:03 +00:00
Miklos Vajna
76a90e6606
PHP: define our own ZEND_MODULE_BUILD_ID macro for PHP <= 5.3
...
This silences the warning, but causes no breakage for future releases.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11504 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-05 11:37:45 +00:00
Miklos Vajna
9444f2cebe
PHP: fix for the import_nomodule testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11490 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-03 13:52:25 +00:00
Olly Betts
5215d9227a
[Python] Fix indentation so that we give a useful error if the
...
module can't be loaded. Patch from Gaetan Lehmann in SF#2829853.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-31 12:09:25 +00:00
William S Fulton
43da669254
improved warning code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 18:48:14 +00:00
Miklos Vajna
ad0428538d
PHP: fix for the cpp_namespace testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11480 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 14:01:27 +00:00
Miklos Vajna
7e4b1a086d
PHP: Cleanups.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11479 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 12:16:50 +00:00
Olly Betts
19c4162047
Remove dead code.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 08:50:56 +00:00
Olly Betts
7c84046a36
Make SwigPHP_emit_resource_registrations() static.
...
Remove "NEW Destructor style" comment as it's no longer meaningful.
Undo indent damage.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11476 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 08:39:27 +00:00
William S Fulton
028fcff0a5
remove redundant method
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11474 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 06:08:36 +00:00
William S Fulton
7f0e632ddd
typemap method name: use consistent terminology in code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11473 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 06:06:49 +00:00
William S Fulton
b1a1e3d323
consistent terminology for multi-argument typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11471 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 20:52:29 +00:00
William S Fulton
bf0ee4471c
(method, typelist) special variable macro fixed/enhanced and made official
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 20:50:39 +00:00
Miklos Vajna
ae606df4df
PHP: fix for the allowexcept testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11469 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 16:17:04 +00:00
Miklos Vajna
22351914fe
PHP: Avoid calling is_resource() twice with no good reason
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11466 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 11:03:22 +00:00
Olly Betts
4b7478ac15
[PHP] Fix memory leak in PHP resource destructor for classes
...
without a destructor and non-class types. Patch from Hitoshi Amano
in SF#2825303.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11463 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 02:06:18 +00:00
Olly Betts
c321421bc5
[PHP] Update warnings about clashes between identifiers and PHP
...
keywords and automatic renaming to work with the PHP5 class
wrappers. Fixes SF#1613679.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11460 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-28 13:12:06 +00:00
Miklos Vajna
0fa227ea83
PHP: fix for the director_using testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11459 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-28 11:47:36 +00:00
William S Fulton
82312aacf8
remove some debugging cruft
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11455 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-26 21:29:55 +00:00
William S Fulton
413f114eda
fix some overloaded warning messages when templates are used
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11454 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-26 21:21:26 +00:00
Miklos Vajna
0249eea389
Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00
William S Fulton
8ec7035eee
improve WARN_LANG_OVERLOAD_KEYWORD warning by giving the name of the overloaded function
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-18 22:34:33 +00:00
Olly Betts
c1399658ff
[Perl] Don't specify Perl prototype "()" for a constructor with a
...
different name to the class, as such constructors can still take
parameters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11397 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-15 07:43:16 +00:00
Xavier Delacour
3fb96c2364
fix typo
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-12 21:11:08 +00:00
Xavier Delacour
cdc9de8210
small fixes to make octave module compatible with octave 3.2
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11388 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-12 20:23:19 +00:00
William S Fulton
224c83ef09
Typemap API changes to facilitate more uniform typemap handling across language modules - in particular some typemaps usage did not respect the warning attribute and other warning handling and $typemap special variable (which will be refined in future commit) as well as local typemap variable handling:
...
- remove Swig_typemap_search, Swig_typemap_search_multi and Swig_typemap_attach_kwargs from access outside of typemaps.c (made static)
- all static methods in typemap.c renamed dropping Swig_ prefix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-08 12:17:45 +00:00
Olly Betts
dc4474c95d
Use single quotes for string literals since we don't need or want substitutions
...
to work.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11361 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-05 03:47:26 +00:00
William S Fulton
c7d90e58d8
improve some director warning messages
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11316 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-25 06:01:11 +00:00
William S Fulton
0a1c7c91b1
fix Java and C# enums when one of the enum items is ignored
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11279 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-16 19:29:08 +00:00
William S Fulton
54b87bdd7d
remove extra lookup of directorout typemap
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11246 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-05 17:19:29 +00:00
Mikel Bancroft
88ffb89c2b
[allegrocl] Minor tweak to improve wrapping in -nocwrap mode.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11212 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-05-14 00:35:17 +00:00
William S Fulton
7e8d19cec0
Add the 'notderived' attribute to the javabase and csbase typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11196 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-29 17:58:32 +00:00
Olly Betts
38f00d3544
[Python] Don't attempt to acquire the GIL in situations where we
...
know that it will already be locked. This avoids some dead-locks
with mod_python (due to mod_python bugs which are apparently
unlikely to ever be fixed), and results in smaller wrappers which
run a little faster (in tests with Xapian on x86-64 Ubuntu 9.04,
the stripped wrapper library was 11% smaller and ran 2.7% faster).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-29 09:35:58 +00:00