[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: looking for fix to AMD64 python dl problem....




>
According to the Python docs [0], dl only works with a number of
conditions:

  Note: This module will not work unless sizeof(int) == sizeof(long) ==
  sizeof(char *) If this is not the case, SystemError will be raised on
  import.

If you run this program on an amd64 machine:

  $ cat sizes.c
  #include <stdio.h>

  int main(void) {
printf("int: %d; long: %d; char *: %d\n", sizeof(int), sizeof(long), sizeof(char *));
    return 0;
  }

This is what you get:

  $ ./a.out
  int: 4; long: 8; char *: 8

So, the answer is that the dl module will not work on amd64.  The
recommended fix would then be to not use dl, since it is an ugly hack
(as is any foreign function interface) and instead write proper Python
bindings for whatever library you are trying to access.

I sent this comment and the other one posted to the developer...... It seems to have frightened him away......

No more emails from him.

Oh well.....

I don't know how to write Python bindings or whatever they are.

Regards

Michael Fothergill






Regards,

-Roberto
--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com


<< signature.asc >>

_________________________________________________________________
Click Here To Find Your Perfect Match This Valentines! http://msnuk.match.com/



Reply to: