<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.programming.swig">
    <title>gmane.comp.programming.swig</title>
    <link>http://blog.gmane.org/gmane.comp.programming.swig</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13330"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13328"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13327"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13324"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13319"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13317"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13316"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13309"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13308"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13304"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13303"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13302"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13301"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13290"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13289"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13288"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13285"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13282"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13281"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.programming.swig/13279"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13330">
    <title>Renaming a C++ class and retaining backwardscompatibility</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13330</link>
    <description>I am renaming a C++ class to better reflect it's actual behavior.  
However, I need to maintain backwards compatibility for several  
releases since it is such a widely used class. In C++, this is simple,  
just add a typedef:

typedef OECPUTimer OEStopwatch;

In the python wrappers the name change can be easily propagated by the  
following:

%pythoncode %{
OEStopwatch = OECPUTimer
%}

However, how do I do this in Java? Or better yet, generically inside  
the SWIG interface file?

I've tried the following in the .i files to no success:

typedef OECPUTimer OEStopwatch;

or

%inline %{
typedef OECPUTimer OEStopwatch;
%}

Is there some fancy rename trick I'm missing?

Thanks,
Brian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Brian Cole</dc:creator>
    <dc:date>2008-08-28T22:58:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13328">
    <title>c++ exception and java</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13328</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Schmilinsky, Remsy</dc:creator>
    <dc:date>2008-08-28T17:49:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13327">
    <title>%ignoring only a type?</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13327</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>David Piepgrass</dc:creator>
    <dc:date>2008-08-28T00:40:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13324">
    <title>JAVA_ARRAYSOFCLASSES again</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13324</link>
    <description>Hi,

I'm having troubles using the JAVA_ARRAYSOFCLASSES macro with an array 
of classes declared in c++ like "MyClass** list;". I've read other posts 
talking about it and succeeded in having simple examples working. 
However the following configuration does fail:

-&gt;My MyClassTest.i file contains
-------MyClassTest.i------------
%module MyClassTest
%include "typemaps.i"
%include "arrays_java.i"
%include "various.i"
JAVA_ARRAYSOFCLASSES(MyClass)
%apply MyClass[] { MyClass** list}
%include "MyClassDef.h"
------------------------------


-&gt;MyClassDef.h contains
------MyClassDef.h -----------
MyClass{
public:
int i;
int j;
int foobar();
bool barfoo();
};

class MyClasses{
public:
 void bar(int i);
 void foo();
 MyClass** list;
};
--------------------------------


-&gt;The generated MyClassTest_wrap.cxx is wrong(but compiles) and contains 
the following code for accessing the MyClass Array:
-----MyClassTest_wrap.cxx---------------------
SWIGEXPORT jlongArray JNICALL 
Java_myPackage_MyClassTestJNI_MyClasses_1list_1get(JNIEnv *jenv, jclass 
jcls, jlong jarg1, jobject jarg1_) {
  jlongArray jresult = 0 ;
  MyClasses *arg1 = (MyClasses*) 0 ;
  MyClasses **result = 0 ;
 
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(MyClasses **)&amp;jarg1;
  result = (MyClass **) ((arg1)-&gt;list);
  *(MyClass ***)&amp;jresult = result;
  return jresult;
}
---------------------------------------------------


-&gt;The generated Java wrapper is also wrong(and do not compile) as 
MyClasses.java contains the following accessor code:
----------------MyClasses.java-----------------
  public SWIGTYPE_p_p_MyClass[] getList() {
    return 
SWIGTYPE_p_p_MyClass.cArrayWrap(MyClassTestJNI.MyClasses_list_get(swigCPtr, 
this), false);
  }
----------------------------------------------


I'm using "swig -c++" (1.3.35) under windows with MinGW

Do you have any clues why the correct code is not generated when I'm 
trying to use JAVA_ARRAYSOFCLASSES with an array of classes declared 
like "MyClass** list"?

Many Thanks.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Jean-Yves Lawson</dc:creator>
    <dc:date>2008-08-27T15:26:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13319">
    <title>Swig and Ant?</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13319</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Hendrik Maryns</dc:creator>
    <dc:date>2008-08-25T15:42:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13317">
    <title>Swig Python/Autocad bindig</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13317</link>
    <description>
Hi All,

I've been trying to wrap the AutoCAD ARX api (ARX is the app's C++ SDK) with
some success but am stumped at the moment with what may be a simple problem.
The wrapper seems to work with some methods but not others.
For instance, I can call a wrapped global function no problem, this was the
first test to see if the wrapper was going to work. Now that I've wrapped
some C++ classes I've hit a snag, I seem to be able to call a simple method
from a class but when I try to debug other methods the breakpoints are not
getting hit and I receive an error and the method in Python fails.

As I have no debugging from Python i can print what the pyobject is to the
autocad command line using str(object) and I am indeed getting a pointer to
a proxy object, it's functions are just not getting called. The functions
are overloaded and swig has produced the code to decide which one to call
and I have set bp's at each one and none get hit.
Any help greatly appreciated, if you need the solution or for me to post
some code (the .i file is quite large but I can post bit's you might need to
look at), just let me know.

Thanks,
Mick.

Some set up details -
winXP SP2
VS2005 std SP1
Python 2.5.2
SWIG 1.3.36
AutoCAD 2008 SDK
</description>
    <dc:creator>Mick Duprez</dc:creator>
    <dc:date>2008-08-25T07:57:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13316">
    <title>Compilation errors when using Perl 5.8 headers,to upgrade the module from 5.6.1</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13316</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Thomas Theakanath</dc:creator>
    <dc:date>2008-08-21T00:46:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13309">
    <title>Segmentation Faults with PHP bindings</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13309</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Christopher Schwardt</dc:creator>
    <dc:date>2008-08-18T10:41:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13308">
    <title>Can't find jni files when using packages</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13308</link>
    <description>I'm trying to figure out how to actually develop java library from c++ 
code.  I've put a couple of simple classes together and done the following:

        swig -c++ -package com.fay.test -outdir src/com/fay/test -java 
demo.i
        gcc -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux -c 
demo_wrap.cxx
        ld -G demo_wrap.o  -o libdemo.so

Which worked fine.  My interface looks like:
%module book

%{
#include "book.h"
%}

/* Let's just grab the original header file here */
%include "book.h"

%module document

%{
#include "document.h"
%}

Book has a reference to the  Document class.  When I attempt to compile 
the java files I get:

jim&lt; at &gt;chinaberry:~/c++/src/com/fay/test$ javac *.java
Document.java:31: cannot find symbol
symbol  : method delete_Document(long)
location: class com.fay.test.bookJNI
      bookJNI.delete_Document(swigCPtr);
             ^
Document.java:37: cannot find symbol
symbol  : method new_Document()
location: class com.fay.test.bookJNI
    this(bookJNI.new_Document(), true);
                ^
Document.java:41: cannot find symbol
symbol  : method Document_document_set(long,com.fay.test.Document,long)
location: class com.fay.test.bookJNI
    bookJNI.Document_document_set(swigCPtr, this, 
SWIGTYPE_p_string.getCPtr(value));
           ^
Document.java:45: cannot find symbol
symbol  : method Document_document_get(long,com.fay.test.Document)
location: class com.fay.test.bookJNI
    return new SWIGTYPE_p_string(bookJNI.Document_document_get(swigCPtr, 
this), true);

That's after I cd'ed to the source directory.  The same thing happens if 
I do:

javac src/com/fay/test/*.java

So how do I compile?

Environment: Ubunty 8.04, java package: sun-java6-jdk , 2.6.24-19 kernel,

Thanks,
Jim.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Jim</dc:creator>
    <dc:date>2008-08-17T15:44:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13304">
    <title>C linked list to Python list/iterator</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13304</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Viktor Hornak</dc:creator>
    <dc:date>2008-08-15T22:21:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13303">
    <title>boost shared_ptr incorrect deletion problem</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13303</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Naveen Khanna</dc:creator>
    <dc:date>2008-08-15T21:32:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13302">
    <title>array parameters and pinning in c#</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13302</link>
    <description>                    Hi!

   Continuing my adventures w/ c# as the target language, I noticed that  
there were no typemaps for wrapping arrays (or did I just miss them?). No  
matter, should be easy enough to do.

   It seems p/invoke makes a copy of the array being passed, so I thought  
it would be more efficient to pin a pointer to the array and pass in that.  
So I did something like this:

%typemap(ctype)  int *INPUT_ARRAY, int &amp;IN_ARRAY "int*"
%typemap(imtype) int *INPUT_ARRAY, int &amp;IN_ARRAY "IntPtr"
%typemap(cstype) int *INPUT_ARRAY, int &amp;IN_ARRAY "int[]"
%typemap(csin,
                pre=
"  Debug.Assert( $csinput != null &amp;&amp; $csinput.Length &gt; 0 ) ;\n"
"  fixed ( int* csArrPtr$csinput = $csinput ) {\n",
                post="} // end fixed csArrPtr$csinput") int *INPUT_NARRAY,  
int &amp;IN_NARRAY "(IntPtr)csArrPtr$csinput"

%typemap(in)      int *INPUT_ARRAY, int &amp;INPUT_ARRAY "$1 = $input ;"
%typemap(freearg) int *INPUT_ARRAY, int &amp;INPUT_ARRAY ""
%typemap(argout)  int *INPUT_ARRAY, int &amp;INPUT_ARRAY ""


   There is a slight problem, though - post attribute of csin typemap  
doesn't seem to be the right place for closing the scope of the fixed  
statement. The stuff there gets inserted into the finally block after the  
imcall and obviously closes that block. In some cases it doesn't matter,  
in some it does.

   So, has anybody figured out how to pass pinned arrays in c# using swig?



       ::Antti::


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Antti Karanta</dc:creator>
    <dc:date>2008-08-15T06:22:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13301">
    <title>illegal Cast to array type</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13301</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Terence Kim</dc:creator>
    <dc:date>2008-08-14T18:42:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13290">
    <title>Is code generated by SWIG is portable?</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13290</link>
    <description>Hello,

I would like to know if the code generated by SWIG is portable? In  
other words, can I package a software with some code already generated  
by SWIG and expect it to be compiled everywhere?

Thanks!

---------------------
Alexandre Hamez
alexandre.hamez&lt; at &gt;gmail.com






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Alexandre Hamez</dc:creator>
    <dc:date>2008-08-13T11:26:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13289">
    <title>64-bit Segmentation Fault with Swig 1.3.36</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13289</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Brian Bird</dc:creator>
    <dc:date>2008-08-13T11:08:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13288">
    <title>[swigwin] Swigwin does it support callback functions?</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13288</link>
    <description>Hey,

I'm a newbie in SWIG, maybe my previous question was not written
clear, that's why I ask you (again, with proper information what I
need). Is swig capable of having callback functions and capable of
embedding a script interpreter? I think about registering a C/C++
function, calling the script and the script is still able to use this
registered function.

THANK you for helping me, every hint, help is appreciated.

thanks

p0ly

PS: I tried to find it using google but unfortunately there was not a
result or I simply used the wrong expression.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Steven Crypter</dc:creator>
    <dc:date>2008-08-13T06:37:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13285">
    <title>swigwin 1.3.36 weirdness?</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13285</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Dennis Sacks</dc:creator>
    <dc:date>2008-08-12T23:14:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13282">
    <title>Error in generated python wrapper code for statictemplate member function</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13282</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Naveen Khanna</dc:creator>
    <dc:date>2008-08-12T15:33:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13281">
    <title>flite C wrapper for C#</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13281</link>
    <description>Hi:

this is my first post to the list, so first to all hi to everyone and 
let me congratulate you for such a great project it help a lot with the 
difficult and tedious task of make wrappers....

Right now I'm trying to make a simple wrapper for c# of the C API of 
flite tts engine, so I use something like this to generate the wrapper:
swig -csharp -namespace TTS -module flite flite.h

The command above generate me the correct C# files and a flite_wrap.c C 
code file, I create a shared lib from flite_wrap.c like 
linflitewrap.so.1.0.1 and I was able to call from a C# program to the 
simple flite "init"function, the declaration of that function in the 
flite.h interfaces is like: int flite_init();, the flite_wrap.c 
generated file make a definition of that function like:
SWIGEXPORT int SWIGSTDCALL CSharp_flite_init() {
...
  result = (int)flite_init();
...
And I'm able to call the function from my mono C# code like: 
TTS.flite.flite_init(); , so far all good, but currently my problem is 
with this originally function from flite.h:

float flite_text_to_speech(const char *text, cst_voice *voice, const 
char *outtype);

As you can see, I need the cst_voice type, so SWIG make this for that 
function (flite_wrap.c):

SWIGEXPORT float SWIGSTDCALL CSharp_flite_text_to_speech(char * jarg1, 
void * jarg2, char * jarg3) {
  float jresult ; char *arg1 = (char *) 0 ;  cst_voice *arg2 = 
(cst_voice *) 0 ;  char *arg3 = (char *) 0 ;  float result;
  arg1 = (char *)jarg1;  arg2 = (cst_voice *)jarg2;   arg3 = (char *)jarg3;
  result = (float)flite_text_to_speech((char const *)arg1,arg2,(char 
const *)arg3);
  jresult = result;   return jresult;}

wich seems to be ok, but in the C# code SWIG make this for the cst_voice 
type:
public class SWIGTYPE_p_cst_voice {
  private HandleRef swigCPtr;
internal SWIGTYPE_p_cst_voice(IntPtr cPtr, bool futureUse) {
    swigCPtr = new HandleRef(this, cPtr);
  }
  protected SWIGTYPE_p_cst_voice() {
    swigCPtr = new HandleRef(null, IntPtr.Zero);
  }
  internal static HandleRef getCPtr(SWIGTYPE_p_cst_voice obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }
}
..and here begin my problems, because I can't call to any constructor of 
this type, this type is originally used in C like:
flite_init();
cst_voice *register_cmu_us_kal();
cst_voice *v;
v = register_cmu_us_kal();
flite_text_to_speech("wellcome professor", v, "play");

So I was trying to do from C# something like:
TTS.flite.flite_init(); // --&gt; OK
TTS.SWIGTYPE_p_cst_voice v; // here I have my first problem becouse I 
don't have any public constructor..and even if I change the swig 
contructor declaration //for this type from protected to public I get a 
really ugly SIGSEGV error without any useful info.
TTS.flite.flite_text_to_speech("wellcome professor", v, "play"); //of 
course I can't call to this becouse "v" don't exist...

Here is the original declaration of cst_voice from cst_voice.h (used by 
flite.h):
struct cst_voice_struct {
    cst_features *features;
    cst_features *ffunctions;
    cst_utterance *(*utt_init)(cst_utterance *u,
                   struct cst_voice_struct *v);
};
typedef struct cst_voice_struct cst_voice;
cst_voice *new_voice();
void delete_voice(cst_voice *u);

So, basically I don't know where to start to look or check to make this 
wrapper to work, any ideas?, sugestions?

Thank you very much

Mauricio



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Mauricio Henriquez</dc:creator>
    <dc:date>2008-08-12T13:12:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13279">
    <title>handling comples macros</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13279</link>
    <description>With SWIG, I'm generating Python wrapper for a C library containing
complicated preprocessor macros. For example,

#define MACRO1  (funccall1(), globalvar)
#define MACRO2  (funccall2(), 2 /* literal */)

I could see SWIG ignored those macros although globalvar was put inside cvar
property. My goal is to access those macros in Python like the following:

  modulename.MACRO1
  modulename.MACRO2

Assuming that globalvar is not modified after the initialization, I think
one possible solution is to write some SWIG commands in the interface file.
For example,

%module modulename
%{
%}
%init %{
  funccall1();
  funccall2();
%}

#undef MACRO1
%constant int MACRO1 = globalvar;

#undef MACRO2
#define MACRO2 2

It worked (at least) for me, but I was wondering if there is any better
solution. I don't think is a good solution in that I hardcoded a variable
and a literal. Since calling funccall1() and funccall2() several times does
not make any problem, I don't think any complicated logic is needed here;
the generated Python wrapper can just call funccall1() or funccall2() and
then retrieve the variable or the number whenever MACRO1 or MACRO2 is
accessed.

If this is not supported, I'm wondering if others think this is important or
useful feature, and it is worth requesting this feature.

Thanks!


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/
</description>
    <dc:creator>Choonghwan Lee</dc:creator>
    <dc:date>2008-08-11T17:45:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.programming.swig/13277">
    <title>catching heap errors in C#</title>
    <link>http://comments.gmane.org/gmane.comp.programming.swig/13277</link>
    <description>-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/_______________________________________________
Swig-user mailing list
Swig-user&lt; at &gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user
</description>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2008-08-11T16:42:01</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.programming.swig">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.programming.swig</link>
  </textinput>
</rdf:RDF>
