Problems extending Python 2.0 with FREE BORLAND C 5.5

Vadim Chugunov chega_ at yahoo.com
Fri Nov 3 01:41:29 EST 2000


"Matthias Fischer" <mfischer at fh-brandenburg.de> wrote in message
news:3a004a2c.4678958 at news.cis.dfn.de...
> I'm working on a date-class for Python 2.0 with the FREE BORLAND C/C++
> Compiler 5.5 using the extension template from : Gordon Williams
> Everything works fine exept the print function which crashes.
>
> static int Date_print(Dateobject *self, FILE *fp ,int flags)
> {
>     fprintf(fp,"%02ld.%02ld.%04ld",self->day,self->month,self->year);
>
>     return 0 ;
> }
> Without using the FILE pointer everything is OK. But I think it would
> be better to use FPRINTF in case of PRINTF.
>
> Is there something special about using these functions in Python 2.0 ?
> Or does my DLL not have the rights to use the FILE-Pointer ?

Borland C defines FILE structure differently than MS VC.
I am afraid your choices are limited to the following:
a) Not use functions that take FILE* argument.
b) Create an import lib for msvcrt.dll and force linker to use fprintf()
from that lib instead of Borland's clib.

Vadim






More information about the Python-list mailing list