[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dazuko-devel] Perl language binding cleanup for 64bit systems
From: |
Gerhard Sittig |
Subject: |
[Dazuko-devel] Perl language binding cleanup for 64bit systems |
Date: |
Wed, 1 Aug 2007 17:45:46 +0200 |
User-agent: |
Mutt/1.5.8i |
I recently was informed that building the Perl binding for the Dazuko
library results in size mismatch warnings (pointers vs integers) on
64bit systems. Here is a quick patch to cleanup how C pointers are
passed to Perl scripts and back.
An even better method would be to make use of "blessed pointers",
which would add automatic type verification on behalf of perlxs(1).
But since I consider the current implementation inappropriate anyway
(it "leaks" the library's internals into the Perl application), that
quick hack should do for now and a much improved version should
materialize RSN. I have plans to cleanly encapsulate internals and to
adjust the API so that applications cannot "forget" to return access
events. This should bring the Perl binding up to where the Python,
Ruby and Lua bindings currently are.
Please notice that some systems may insist in that all object files
which are used to build the IO.so shared library shall be built with
the -fPIC option. So it may be necessary to run the follwing steps:
$ tar xzf dazuko-<version>.tar.gz
$ cd dazuko-<version>
$ ./configure [ options ]
$ vi library/Makefile
maybe add "CFLAGS += -fPIC"
$ make -C library
$ cd example_perl
$ perl Makefile.PL
$ make
# make test
# make install
# perl Example.pl `pwd`
virtually yours Gerhard Sittig
pgp fingerprint AF29 3CD2 A531 F5A8 5F42 CB9A 1B7F 59F8 BA7A 9EE5
--
If you don't understand or are scared by any of the above,
ask your parents or an adult to help you.
patch-dazuko-perl-pointer.diff
Description: Text document
- [Dazuko-devel] Perl language binding cleanup for 64bit systems,
Gerhard Sittig <=