[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Help on wrapping a C library
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2005-05-28 15:56:18
Message-ID: 200505281656.18045.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Tuesday 24 May 2005 7:47 pm, Huaicai Mo wrote:
> Hi Phil,
>
> I am sending you the files: word.h, word.c, word.sip, configure.py,
> mytest.c and clib_makefile(the make file used to create the C library and
> the test program). After creating the C library, I added the line
>               /usr/local/lib
> to the /etc/ld.so.conf file, and run:
>            install word*.so /usr/local/lib
>            ldconfig
>
> I don't have a python script to test the extension module. I tested
> interactively. Here is the snapshot:
>
> Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha
> 3.4.1-3mdk)] on linux2 Type "help", "copyright", "credits" or "license" for
> more information.
>
> >>> import word
> >>> print word.anotherReverse("sadkfj;sadf")
>
> fdas;jfkdas
>
> >>> print word.__dict__
>
> {'create_word': <built-in function create_word>, 'Word': <class
> 'word.Word'>, 'reverse': <built-in function reverse>, '__file__':
> 'word.so', 'anotherReverse': <built-in function anotherReverse>,
> '__name__': 'word', '__doc__': None}
>
> >>> w = word.create_word("How are you?")
> >>>print w
>
> <word.Word object at 0x4038fddc>
>
> >>> print word.reverse(w)
>
> Segmentation fault

The fix will be in tonight's SIP snapshot.

Thanks,
Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic