Lindley French | 20 May 02:32 2016
Picon

Why can't SWIG infer directorin:descriptor?

There's some friction caused by the requirement to specify directorin:descriptor. Unlike almost everything else, it takes a Java class name specified with slashes rather than dots, and since there's no way to do string substitution in a macro, you get these macros with an extra argument *just* for the variation.

Instead, couldn't SWIG look up the jstype and do a replace('.', '/') on it to get the descriptor? At least as a fallback if one isn't specified?
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
Ervin Hegedüs | 18 May 22:17 2016
Picon
Gravatar

Python type confusion

Hi Swig users,

there is a library, written in C (Hamlib), which has a maitained SWIG code. Python, Perl and Tcl modules can be compiled.

Looks like some functions in Python doesn't work as well - they gives back wrong datatype.

There is a very big C structure, which has two member whom has the type int[MACRO]. Eg:


  int preamp[MAXDBLSTSIZ];   /*!< Preamp list in dB, 0 terminated */
  int attenuator[MAXDBLSTSIZ];       /*!< Preamp list in dB, 0 terminated */

There isn't any typemap/custom function to get this variables - all related code had generated by SWIG.

Here is a code part by SWIG (swig2.0 -python ...):

SWIGINTERN PyObject *_wrap_rig_caps_attenuator_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct rig_caps *arg1 = (struct rig_caps *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int *result = 0 ;
 
  if (!PyArg_ParseTuple(args,(char *)"O:rig_caps_attenuator_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rig_caps, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rig_caps_attenuator_get" "', argument " "1"" of type '" "struct rig_caps *""'");
  }
  arg1 = (struct rig_caps *)(argp1);
  result = (int *) (int *) ((arg1)->attenuator);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}

When I use the compiled (and installed) Python module, I've got this result:

    ...
    att = my_rig.caps.attenuator
    print att

<Swig Object of type 'rot_reset_t *' at 0x7f14893622d0>

The rot_reset_t is defined in an another C header file, and it has a simple int scalar type... I don't know, how could it be there...

The dictionary of the Python type looks like this:

['__class__', '__cmp__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__hex__', '__init__', '__int__', '__le__', '__long__', '__lt__', '__ne__', '__new__', '__oct__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'acquire', 'append', 'disown', 'next', 'own']


With using of C-API, I can access the integer list items as well.


When I change the type of two members above (attenuator, preamp) to an own type, eg:

typedef int arr_int[MAXDBLSTSIZ];
...
  arr_int preamp;       /*!< Preamp list in dB, 0 terminated */
  arr_int attenuator;   /*!< Preamp list in dB, 0 terminated */

then the SWIG generated code changed to this:

  ...
  arg1 = (struct rig_caps *)(argp1);
  result = (int *) ((arg1)->attenuator);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
  ...

So, the type of result will be (int *), instead of (int *)(int *). But the result in Python is same, not changed.

I've tried to use typemap in swig file:
#ifdef SWIGPYTHON
%typemap(out) int [ANY] {
  int i;
  $result = PyList_New($1_dim0);
  for (i = 0; i < $1_dim0; i++) {
    PyObject *o = PyInt_FromInt((int) $1[i]);
    PyList_SetItem($result,i,o);
  }
}
#endif

but it looks like has no effect, the generated C source file is same as above.


What do I forget? What's wrong with that type and code?


Many thanks for any help, ans sorry for the long mail.


a.



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
Jimi Damon | 16 May 23:03 2016
Gravatar

%rename with automatically created Setters / Getters

Hi,

How could you configure %rename to rename the getters and setters 
assigned to a given C structure for a language like Java.

/*-------------- Bar.h --------------------*/
void test_fn_for_later(void );
typedef struct Bar {
  int a;
  int b;
} Bar;
/*------------------------------------*/

I would like to rename the setters or getters to be

set_a / get_a  and set_b / get_b  versus   setA / getA and setB / getB.

I can rename the function test_fn_for_later pretty easily using 
something like

%rename("a_new_function") "test_fn_for_later"

but I can't figure out how to create a rule that will match the 
generated functions that SWIG gives to the structure Bar ?

I've tried using the

%extend Bar {

     %rename(set_b) SetB;
}

with no success.

Thanks,

-Jimi

-- 
WARNING - This e-mail or its attachments may contain controlled technical 
data or controlled technology within the definition of the International 
Traffic in Arms Regulations (ITAR) or Export Administration Regulations 
(EAR), and are subject to the export control laws of the U.S. Government. 
Transfer of this data or technology by any means to a foreign person, 
whether in the United States or abroad, without an export license or other 
approval from the U.S. Government, is prohibited. The information contained 
in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc. 
Any unauthorized review, use, disclosure or distribution is prohibited 
without express written consent of ACCES I/O Products, Inc. If you are not 
the intended recipient, please contact the sender and destroy all copies of 
the original message and enclosed attachments.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Matěj Cepl | 14 May 14:32 2016
Picon
Gravatar

Python type hinting stubs generator?

Hi,

does anybody know about a program which would generate *.pyi 
files for PEP-484 for libraries bindings generated by SWIG?

Thanks,

Matěj

--

-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl <at> ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8

Give your heartache to him. (1Pt 5,7; Mt 11:28-30)
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
Jimi Damon | 13 May 01:05 2016
Gravatar

How to have a separate function signature for a specific language

Hi,

I am just trying to find out what might be the best strategy for 
structuring my code for the case where I want a different function 
signature for Java as compared to all of the other languages that I am 
supporting.

I ran into the Immutability problem of Java arrays , and realized that 
%typemap(argout) isn't really going to work with a function that is 
being called in Java because I can't modify the String[]. My question is 
, is there a way in SWIG to specify that for only Java, I want to change 
the signature of the function.

An example is

/* C original function */
int foo(  int argc, char **argv );

In python I would like to call this as

sys.argv = ["-N", "100","-B","512"]
retval = foo( sys.argv )

And have sys.argv be altered.

Since it is not possible in Java, I want to change the function 
signature so that it would be called as follows

String[]  foo( String[] args )

or even return something else like a Tuple that could contain both the 
return code and the modified args.

Is there a "Best Practices way" to override the function signature and 
do it specifically in the SWIG Module.i  file ?

Currently I have a C header file that has

#if defined(SWIGJAVA)
char **foo( int argc, char **argv );
#else
int foo( int argc, char **argv);
#endif

And I will have a typemap to converthe char ** into a String[].

Since I am trying to manage documentation for this code I would prefer 
to not go with this approach as my header files start to look really ugly.

Thanks for any ideas.

-Jimi

-- 
WARNING - This e-mail or its attachments may contain controlled technical 
data or controlled technology within the definition of the International 
Traffic in Arms Regulations (ITAR) or Export Administration Regulations 
(EAR), and are subject to the export control laws of the U.S. Government. 
Transfer of this data or technology by any means to a foreign person, 
whether in the United States or abroad, without an export license or other 
approval from the U.S. Government, is prohibited. The information contained 
in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc. 
Any unauthorized review, use, disclosure or distribution is prohibited 
without express written consent of ACCES I/O Products, Inc. If you are not 
the intended recipient, please contact the sender and destroy all copies of 
the original message and enclosed attachments.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Miguel Michelsongs | 12 May 22:27 2016
Picon
Gravatar

Re: need help wrapping a C++ lib to Golang

Hi William, Hi Lance
Thanks for your replies

SWIG Version 3.0.8 (Compiled with clang++ [x86_64-apple-darwin14.5.0])
Go Version 1.5.2 (but I've tried this with 1.4.2 too)

Now I've been able to avoid those errors because I've included the proper dependency

/* Includes the header in the wrapper code */ #include "./imgui/imgui.h" #include "./cimgui/cimgui.h" %} /* Parse the header file to generate wrappers */ %include "./cimgui/cimgui.h"

But now I've get 

./cimgui_wrap.cxx:1749:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:1798:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:1830:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:1862:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:1911:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:1950:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:3437:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:3462:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed ./cimgui_wrap.cxx:3786:10: error: C-style cast from '__va_list_tag *' to 'va_list' (aka '__builtin_va_list') is not allowed

I know that Swig have some issues casting va_list , but the code I'm trying to wrap is full of those arguments.
I've read the documentation but I don't know which is the best way to do it.

for example, for methods like this:

int ImFormatString(char* buf, int buf_size, const char* fmt, ...) { va_list args; va_start(args, fmt); int w = vsnprintf(buf, buf_size, fmt, args); va_end(args); buf[buf_size-1] = 0; return (w == -1) ? buf_size : w; }

which approach would I take ?

best

Atte.
Miguel Michelson Martinez
www.artenlinea.com

On Thu, May 12, 2016 at 5:19 PM, Ian Lance Taylor <iant <at> google.com> wrote:
On Thu, May 12, 2016 at 12:35 PM, William S Fulton
<wsf <at> fultondesigns.co.uk> wrote:
> I'm not very familiar with the Go SWIG wrappers, but it might help if
> you run an example as follows:
>
> cd Examples/go/class
> make check
>
> I'm afraid that the output is rather verbose but amongst all the
> verbiage, you should be able to work out what is essential to run. I'm
> not sure if it correlates with the docs
> http://swig.org/Doc3.0/Go.html#Go_running_swig.


Which version of SWIG?  Which version of go?

It's generally easiest to use SWIG with go by using the go tool to run
SWIG.  You can do that by putting your SWIG interface in a file
foo.swigcxx and running `go build` as usual.  There are some brief
docs at https://golang.org/cmd/go/#hdr-Calling_between_Go_and_C.

Ian



> On 29 April 2016 at 01:50, Miguel Michelsongs <miguelmichelson <at> gmail.com> wrote:
>> Hello List,
>>
>> Fist time here, I'm a C++ noob , so please don't be so rough with me :D
>>
>> I've been trying to build a wrapper for IMGUI library, I've taken the CIMGUI
>> implementation which is built for the purpose of build bindings to other
>> languages.
>>
>> I'm using the following interface:
>>
>> %{
>> #include "../imgui/imgui.h"
>> #include "cimgui.h"
>> %}
>>
>>
>>
>> with the following command to generate the wrapper
>>
>>
>> SWIG -c++ -go -gccgo -intgosize 64 cimgui.swig
>>
>> and this for compile the wrapper the library with the compiled library:
>>
>> gcc -c cimgui.cpp cimgui_wrap.cxx
>>
>> my problem then is when I try to run go build the generated go file:
>>
>> # command-line-arguments
>> ./cimgui.go:39: missing function body for "SwigCgocall"
>> ./cimgui.go:40: missing function body for "SwigCgocallDone"
>> ./cimgui.go:41: missing function body for "SwigCgocallBack"
>> ./cimgui.go:42: missing function body for "SwigCgocallBackDone"
>>
>> ./cimgui.go:45: missing function body for "_swig_wrap_Swig_free"
>>
>>
>> I really don't know how to proceed in this point , so I'm looking for some
>> pointers from the experts on how can I manage this issue.
>>
>> I've already opened an Github issue here
>> https://github.com/swig/swig/issues/667 but it was closed because the gh
>> issues are intended for swig development only (didn't note that before
>> create the issue).
>>
>> thanks in advance ,
>> Best!
>>
>> Miguel Michelson Martinez
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Swig-user mailing list
>> Swig-user <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/swig-user
>>

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
William S Fulton | 12 May 21:35 2016
Picon
Gravatar

Re: need help wrapping a C++ lib to Golang

I'm not very familiar with the Go SWIG wrappers, but it might help if
you run an example as follows:

cd Examples/go/class
make check

I'm afraid that the output is rather verbose but amongst all the
verbiage, you should be able to work out what is essential to run. I'm
not sure if it correlates with the docs
http://swig.org/Doc3.0/Go.html#Go_running_swig.

William

On 29 April 2016 at 01:50, Miguel Michelsongs <miguelmichelson <at> gmail.com> wrote:
> Hello List,
>
> Fist time here, I'm a C++ noob , so please don't be so rough with me :D
>
> I've been trying to build a wrapper for IMGUI library, I've taken the CIMGUI
> implementation which is built for the purpose of build bindings to other
> languages.
>
> I'm using the following interface:
>
> %{
> #include "../imgui/imgui.h"
> #include "cimgui.h"
> %}
>
>
>
> with the following command to generate the wrapper
>
>
> SWIG -c++ -go -gccgo -intgosize 64 cimgui.swig
>
> and this for compile the wrapper the library with the compiled library:
>
> gcc -c cimgui.cpp cimgui_wrap.cxx
>
> my problem then is when I try to run go build the generated go file:
>
> # command-line-arguments
> ./cimgui.go:39: missing function body for "SwigCgocall"
> ./cimgui.go:40: missing function body for "SwigCgocallDone"
> ./cimgui.go:41: missing function body for "SwigCgocallBack"
> ./cimgui.go:42: missing function body for "SwigCgocallBackDone"
>
> ./cimgui.go:45: missing function body for "_swig_wrap_Swig_free"
>
>
> I really don't know how to proceed in this point , so I'm looking for some
> pointers from the experts on how can I manage this issue.
>
> I've already opened an Github issue here
> https://github.com/swig/swig/issues/667 but it was closed because the gh
> issues are intended for swig development only (didn't note that before
> create the issue).
>
> thanks in advance ,
> Best!
>
> Miguel Michelson Martinez
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers
> of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Swig-user mailing list
> Swig-user <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/swig-user
>

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
William S Fulton | 12 May 21:23 2016
Picon
Gravatar

Re: Octave wrapping and error/exception handling

On 29 April 2016 at 04:26, Chee Wai Lee <cheewai1972 <at> gmail.com> wrote:
> Hi all,
>
> I am having some trouble finding documentation (my main source:
> http://www.swig.org/Doc3.0/Octave.html#Octave) on how error conditions can
> be propagated from the C/C++ code to the Octave runtime.
>
> Right now I use exit(-1) as a stop-gap to alert me of an error in the
> underlying implementation which causes the Octave interpreter runtime to
> crash horribly:
>
> int foo() {
>   if (error) {
>     exit(-1);
>           } else {
>     return good;
>           }
> }
>
> octave:1: mymodule;
> octave:2: mymodule.foo()
>
> Ideally I would like to be able to replace exit(-1) with an elegant way to
> trigger an Octave exception when foo() is invoked in the Octave interpreter
> such that I can do something like:
>
> mymodule;
> try
> mymodule.foo();
> catch
> supportmodule.recover();
> end_try_catch
>
> However I cannot seem to find any documentation or other user-queries on
> this topic online. If anyone is familiar with this, would you please let me
> know where I should start looking? If there is no such existing feature, is
> there swig developer documentation I could consult so I could implement,
> test, and make a pull request for such a feature back into swig’s github
> repo? I have tried looking in the repository’s code for some insight, but I
> currently cannot get a good sense for the development idioms and code base
> around the Octave implementation.

I don't know Octave, but it looks like errors are handled if you look
at the tests. The Examples/test-suite/octave/exception_order_runme.m
and associated interface file Examples/test-suite/exception_order.i is
probably a good test to look at. Doc patches welcome if you figure it
all out.

William

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
BRENNER Pat | 12 May 19:08 2016

Building my interface for Perl

Hi all,

 

I’ve got my interface to C++ building for Perl, except for the link step.

I checked the notes on this link and I believe I need PERL.LIB in order to satisfy my unresolved externals.

 

I’ve downloaded both ActiveState Perl and Strawberry Perl and neither has PERL.LIB as part of the download.

Do I have to build it myself?  Or is there a location where I can download it from?

 

Pat Brenner

SCADA Software Engineer

Applications Engineering

Grid Solutions

a GE and Alstom joint venture

 

T +1 425 250 2547

pat.brenner <at> ge.com

www.gegridsolutions.com

 

10865 Willows Road NE

Redmond WA  98052  USA

 

Imagination at work

 


CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Swig-user mailing list
Swig-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
Glover George | 6 May 20:59 2016
Picon

C# dll question

I ran SWIG on my .i interface, and it produced several .cs files as
well as a single _wrap.cxx file.  The question I have is, when using
Visual Studio to build _wrap.cxx into a .dll, do I have to set Common
Language Runtime Support to /clr or do I need to leave it as "No
Common Language Runtime Support"?   Setting it allows me to add it as
a reference to another C# project, whereas not setting it does not.

Currently I'm not successful in executing the "other" C# project
either way.  I get Unable to load DLL the specified module could not
be found.  I have verified that the file is in the same directory, and
in the case of setting /clr, I have verified the target architecture
and corflags are the same.

Cheers.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Jimi Damon | 28 Apr 02:36 2016
Gravatar

Java ( and other languages ) equivalent to %perlcode and %pythoncode

Hi,

I'm try to get around a problem I have where one of my C functions takes 
a callback function as one of it's arguments.  I want the user to be 
able to pass it a function pointer / reference in their native language 
and have this function call it.

I found a nice way around it for both Perl and Python where I just 
create brand new functions just for each language and I can do
that very easily with the expressions %perlcode and %pythoncode such as

#if defined(SWIGPYTHON)
%pythoncode %{
...

%}
#elif defined(SWIGPERL)
%perlcode %{
...

%}

My issue is that I really want to do the same sort of thing for my Java 
wrappers that I'm generating, but I can't find a %pragma or 
%insert(java)  where this code would make it into my top level Java 
class file.

I've noticed the same sort of thing for Ruby, but I find the C API 
easier to understand so I think I can just write an "inline" function to 
call any passed in lambda.

Is there a recommended way to add in a Java method inline inside the 
Swig file ?

Thanks

-Jimi

-- 
WARNING - This e-mail or its attachments may contain controlled technical 
data or controlled technology within the definition of the International 
Traffic in Arms Regulations (ITAR) or Export Administration Regulations 
(EAR), and are subject to the export control laws of the U.S. Government. 
Transfer of this data or technology by any means to a foreign person, 
whether in the United States or abroad, without an export license or other 
approval from the U.S. Government, is prohibited. The information contained 
in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc. 
Any unauthorized review, use, disclosure or distribution is prohibited 
without express written consent of ACCES I/O Products, Inc. If you are not 
the intended recipient, please contact the sender and destroy all copies of 
the original message and enclosed attachments.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

Gmane