Commit Graph

108 Commits

Author SHA1 Message Date
William S Fulton ecf1765b99 Remove legacy Visual C++ 6 project files
Latest Visual Studio 2022 is unable to update/convert these project files.
It appears that Perl, R, Ruby use gcc mingw on Windows nowadays to compile
extensions, so Visual C++ is no longer supported (maybe incorrect, but it
is not clear to me how to compile C/C++ extensions for these languages
with Visual C++ nowadays).
2024-10-19 23:50:32 +01:00
William S Fulton 94e320f4b0 Remove Ruby output_helper fragment and macro
Use SWIG_AppendOutput instead of output_helper (does not require the
output_helper macro).
2024-10-06 00:36:57 +01:00
Olly Betts f66a81fcb4 Fix extension of filename in comments in examples 2024-09-16 16:51:44 +12:00
matoro 16129d9804 Update examples to recommend compiling with -fPIC instead of -fpic
To reflect previous change to swig defaults.
2024-07-22 17:46:29 -04:00
Olly Betts 3ce0174a0c Fix random doubled spaces in code 2023-11-17 09:49:36 +13:00
Olly Betts c916d81e8d Remove pointer.i from the SWIG library
It's been a dummy file which has done nothing except %echo a deprecation
message since 2002.  The replacement is cpointer.i.
2023-06-15 15:50:51 +12:00
Olly Betts ca58db87b6 Update lingering uses of %addmethods
This was renamed to %extend 21 years ago!

The remaining uses are either in docs for the reference example or in
xml examples (which can't actually be run because they the SWIG command
line syntax they try to use is wrong).
2023-05-29 11:40:53 +12:00
Olly Betts 631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
Olly Betts 892557e799 Improve #include guard macros
Avoid using reserved identifiers such as `_DOHINT_H` (fixes #1989),
fix cases where the name doesn't match the filename, and make the naming
more consistent and less likely to collide with include guards in other
headers.
2022-07-19 09:35:46 +12:00
luz paz c8bec18554 Fix various typos
Found via `codespell -q 3 -L ans,anumber,ba,bae,chello,clos,cmo,coo,dout,fo,funktion,goin,inout,methid,nd,nin,nnumber,object,objekt,od,ois,packag,parm,parms,pres,statics,strack,struc,tempdate,te,thru,uint,upto,writen`
2022-04-11 07:59:36 +12:00
William S Fulton f3357f1f57 Remove use of std::bind2nd which is removed in C++17 2019-06-27 07:40:49 +01:00
luz.paz 87695dacb1 Misc. documentation and source comment typo fixes
Found via `codespell -q 3 -L uint,od,objext,ba,cmo,bae,ans,struc,fo,clos,goin,upto,thru`
Revert changes in previous commit
2019-05-28 11:41:22 +12:00
luz.paz 60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton c9a10eb726 Examples update to support C++17: exception specification throw removal 2018-05-04 20:02:13 +01:00
Olly Betts 3bea8f6b7e [Ruby] Pass Qnil instead of NULL to rb_funcall()
This silences GCC -Wconversion-null warning (on by default with recent
GCC).
2018-04-03 18:01:58 +12:00
Cyrille Faucheux a4884e45e1 Do not abort when unlinking non-data ruby objects
Fixes issue #1168.
Remove a call to abort() (introduced by commit
0e725b5d9b) made when SWIG_RubyUnlinkObjects()
is called on non T_DATA objects. It can happen when the destruction of T_DATA
objects is deferred: the Ruby GC first turn them to T_ZOMBIE, then calls their
free method (SWIG_RubyUnlinkObjects()).
2017-12-27 14:40:26 +01:00
Olly Betts 5a9422d980 Remove GCJ support
GCC7 dropped GCJ.

Closes https://sourceforge.net/p/swig/bugs/823/
2017-10-09 08:32:01 +13:00
William S Fulton 35ef98f4d0 Give same name to common example 2017-02-06 20:30:13 +00:00
William S Fulton 760c008311 Warning fixes for gcc-7
warning: dynamic exception specifications are deprecated in C++11; use 'noexcept' instead [-Wdeprecated]
2017-02-06 20:30:09 +00:00
William S Fulton b5873218b6 Ruby mark_function example and docs fixes
Relates to Ruby trackings hash bug #225
2015-09-05 15:30:50 +01:00
William S Fulton 8e2bc595c6 Remove use of preinst-swig script
Complete the prototype removal in ca1431.

The script prevents SWIGTOOL=gdb from working as gdb can't be used to
debug a shell script, it requires a binary.

Add support for SWIGTOOL in all the examples.

SWIG_LIB_DIR and SWIGEXE must now instead be set by all Makefiles.

See issue #473.
2015-08-21 22:43:17 +01:00
Olly Betts ac1f067ce9 Eliminate trivial differences between the reference examples 2014-11-07 15:34:43 +13:00
William S Fulton f39ed94419 Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 13:13:32 +01:00
Karl Wette f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette b6c1889c08 Fix {python|perl5|ruby|tcl}/java examples
- in Lib/gcj/cni.i: remove JvAllocObject(), change
  JvCreateJavaVM() argument from void* to JvVMInitArgs*
- in Examples/{python|perl5|ruby|tcl}/java/Makefile:
  pass full class name to gcjh, add Example.h as dependency,
  do not override CXX for compiling C++ sources
- in Examples/python/java/example.i:
  add destructor to class to prevent memory loss complaint
2014-05-02 21:44:42 +02:00
Karl Wette 3aacde4f5f Whitespace cleanup of Example Makefiles 2014-04-16 12:06:02 +02:00
Olly Betts 0de4cf13a8 Further cleaning up of class examples 2014-02-24 10:10:24 +13:00
Olly Betts 34c97ffdbd Improve the class example for several languages.
Fix numerous inaccuracies in index.html (where it exists) and eliminate
unnecessary differences between the example code being wrapped.
2014-02-23 18:24:51 +13:00
Olly Betts 2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
William S Fulton b170788459 Executable bits and shebang fixes 2014-02-16 17:30:41 +00:00
William S Fulton 152905e193 Fix gcc -Waddress warning in variables examples 2013-10-18 06:53:02 +01:00
William S Fulton 486eca2faa Disable Ruby free_function test for now.
It is failing in Travis builds with 'ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]' but okay with 'ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]'.

Relying on timely Garbage collection is probably flawed anyway.
2013-04-21 18:24:37 +01:00
William S Fulton 205d50a8c9 Ruby 1.9 fixes: use ruby -I in Makefile and workaround clash with 1.9 builtin Complex numbers in the operator example. 2013-04-21 14:05:56 +01:00
William S Fulton bdf38a8507 Ruby examples makefiles and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
William S Fulton dbd86d3747 Ruby example not working when run - needs fixing/checking 2013-04-19 22:47:26 +01:00
William S Fulton 78cd350fe9 Fix Visual Studio examples to work when SWIG is unzipped into a directory containing spaces. 2013-01-15 07:18:20 +00:00
Klaus Kämpf 23771ef027 Ruby: Replace all occurences of STR2CSTR macro with calls to StringValuePtr
STR2CSTR was deprecated in Ruby since years and got finally removed
in Ruby 1.9


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13967 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-14 15:48:31 +00:00
William S Fulton d64d31a5fa Compile fixes for ruby-1.9.x
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-13 17:12:15 +00:00
William S Fulton 3932d02a2a fix SWIG naming convention
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11663 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-21 00:25:11 +00:00
William S Fulton 48203afbd0 invoke using swig.exe instead of just swig in Visual Studio project files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11166 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-20 23:54:43 +00:00
William S Fulton 65f79a952c Apply small documentation fix - patch #2579863
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11165 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-20 23:40:39 +00:00
William S Fulton e7f8954bea remove svn:executable property where applied incorrectly
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10951 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-26 21:54:49 +00:00
William S Fulton f396ecc619 fix runtime problem in Ruby std_vector example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10805 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-01 20:34:49 +00:00
William S Fulton 3463ced917 various warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-21 23:25:20 +00:00
William S Fulton 600deef43d Fix Ruby C++ example dependencies in dsp files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-21 21:07:49 +00:00
William S Fulton 76eaea911b shadow->proxy terminlogy update
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10398 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-04-29 18:01:45 +00:00
William S Fulton a66071a8c7 64 bit portability fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10072 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-29 22:28:55 +00:00
William S Fulton 532cb45882 eol-style set to CRLF
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-18 21:20:27 +00:00
William S Fulton 03d766a7ce eol-style set to CRLF
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10010 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-18 21:19:24 +00:00
William S Fulton 925adeb175 Remove cvs $Header$
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:54:31 +00:00