J
Java and Swing
I am using SWIG to wrap a C application for use in Python.
C code
======
// returns a pointer to an array of long values in the string, "input"
// MY_DIGIT is a typedef such as, typedef unsigned long MY_DIGIT;
MY_DIGIT *Split(char *input) { ... }
...I build a DLL named, _MyApp.dll
SWIG interface
==============
%module MyApp
extern MY_DIGIT *Split(char *input, char *delimiters);
%include cpointer.i
%pointer_functions(MY_DIGIT, md_ptr);
Python
=============
....when I print "results" python.exe crashes
....any idea why it crashes? Why can't I print it? FYI, if it matters,
I do the same steps in the main method of my C code and there is no
problem.
thanks.
C code
======
// returns a pointer to an array of long values in the string, "input"
// MY_DIGIT is a typedef such as, typedef unsigned long MY_DIGIT;
MY_DIGIT *Split(char *input) { ... }
...I build a DLL named, _MyApp.dll
SWIG interface
==============
%module MyApp
extern MY_DIGIT *Split(char *input, char *delimiters);
%include cpointer.i
%pointer_functions(MY_DIGIT, md_ptr);
Python
=============
....when I print "results" python.exe crashes
....any idea why it crashes? Why can't I print it? FYI, if it matters,
I do the same steps in the main method of my C code and there is no
problem.
thanks.