perl-ctypes:perl-ctypes.git
7 years agoSyntax error
Ryan Jendoubi [Mon, 21 Jun 2010 23:38:59 +0000 (00:38 +0100)]
Syntax error

modified:   lib/Ctypes/Function.pm

7 years ago(Temporarily) usable abi_default() in Function.pm
Ryan Jendoubi [Mon, 21 Jun 2010 23:16:41 +0000 (00:16 +0100)]
(Temporarily) usable abi_default() in Function.pm

Only understands 'c', 's', 'MSWin32', 'linux' and 'cygwin'.
Would Devel::CheckOS be an acceptable dependency?

modified:   MANIFEST
modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoRename 001-math.t -> 001-_call.t
Ryan Jendoubi [Mon, 21 Jun 2010 21:55:29 +0000 (22:55 +0100)]
Rename 001-math.t -> 001-_call.t

7 years agoCtypes::_call working / 001-math.t passing
Ryan Jendoubi [Mon, 21 Jun 2010 21:52:03 +0000 (22:52 +0100)]
Ctypes::_call working / 001-math.t passing

Corrected dereferencing of rvalue at end of Ctypes.xs.

modified:   Ctypes.xs

7 years agoMake the calling chain via AUTOLOAD work
Reini Urban [Mon, 21 Jun 2010 12:45:01 +0000 (14:45 +0200)]
Make the calling chain via AUTOLOAD work
  CDLL->lib ok
  CDLL->lib->func ok
  CDLL->lib->func({sig},args) nok

7 years agorename Ctypes::find_library to Ctypes::load_library
Reini Urban [Mon, 21 Jun 2010 08:41:51 +0000 (10:41 +0200)]
rename Ctypes::find_library to Ctypes::load_library
fix and extend pod

7 years agomerge master
Reini Urban [Mon, 21 Jun 2010 07:07:37 +0000 (09:07 +0200)]
merge master

7 years agoUpdate master & merge doubi's Function.pm
Ryan Jendoubi [Mon, 21 Jun 2010 00:06:37 +0000 (01:06 +0100)]
Update master & merge doubi's Function.pm

Conflicts:
lib/Ctypes/Function.pm
t/002-Function.t

modified:   lib/Ctypes.pm
modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoStylistic changes
Ryan Jendoubi [Sun, 20 Jun 2010 23:55:00 +0000 (00:55 +0100)]
Stylistic changes
modified:   lib/Ctypes/Function.pm

7 years agoCommit before incorporating rurban's patches
Ryan Jendoubi [Sun, 20 Jun 2010 22:50:50 +0000 (23:50 +0100)]
Commit before incorporating rurban's patches

Lots more documentation in Function.pm, started on abi_default()
class method.

modified:   lib/Ctypes.pm
modified:   lib/Ctypes/Function.pm

7 years agofix perms
Reini Urban [Sun, 20 Jun 2010 18:01:33 +0000 (20:01 +0200)]
fix perms
change signatures to match python ctypes
add stubs for library packages
add tests for prototypes, library and function objects

7 years agofind_library: resolve possible ld script
Reini Urban [Sun, 20 Jun 2010 14:01:06 +0000 (16:01 +0200)]
find_library: resolve possible ld script
improve doc

7 years agoadd longdouble to check, no croak in tests
Reini Urban [Sun, 20 Jun 2010 13:31:34 +0000 (15:31 +0200)]
add longdouble to check, no croak in tests

7 years agodo not croak in tests
Reini Urban [Sun, 20 Jun 2010 13:26:09 +0000 (15:26 +0200)]
do not croak in tests
add D - long double to sig check
comment c abi for 64bit

7 years agoMerge branch 'master' of git://gitorious.org/perl-ctypes/perl-ctypes
Reini Urban [Sun, 20 Jun 2010 12:59:05 +0000 (14:59 +0200)]
Merge branch 'master' of git://gitorious.org/perl-ctypes/perl-ctypes

7 years agoFix and extend Ctypes::Function,
Reini Urban [Sun, 20 Jun 2010 12:21:19 +0000 (14:21 +0200)]
Fix and extend Ctypes::Function,
  positional and named params with proper defaults.
Added Ctypes find_library and find_function to extend DynaLoader
Added documentation
Makefile.PL debugging args are optional and perl-specific.
  use a debugging perl to use -g3,
  use perl Makefile.PL DEFINE=-DCTYPES_DEBUG for debugging the XS

7 years agocleanup file permissions from windows, add use Carp
Reini Urban [Sun, 20 Jun 2010 09:31:15 +0000 (11:31 +0200)]
cleanup file permissions from windows, add use Carp

7 years agoWorking test for ::Function, more logic needed v0.001
Ryan Jendoubi [Sun, 20 Jun 2010 05:22:12 +0000 (06:22 +0100)]
Working test for ::Function, more logic needed

Need to add logic for sig validation and putting together ::call
sig from sig, abi & rtype.

modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoFixed ::new, created ::update
Ryan Jendoubi [Sun, 20 Jun 2010 03:52:02 +0000 (04:52 +0100)]
Fixed ::new, created ::update

Realised ::new wasn't putting $func back in the object hash: all
local vars changed to references.

Created update function for resetting Function's name, sig, abi &
rtype all at once. Wrote it in _call then realised it was wrong
there, but thought it might be useful.

modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoCtypes::Function: blessing hashref, overloading '&{}'
Ryan Jendoubi [Sun, 20 Jun 2010 01:06:32 +0000 (02:06 +0100)]
Ctypes::Function: blessing hashref, overloading '&{}'

&{} was simplest in the end (Last one I tried~)

Got AUTOLOAD working ok, but might be a more elegant way of
dealing with whether a particular data member is mutable.

Next: cleaning up, implementing _call, writing tests.

modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoSubref-blessing method seems to work better
Ryan Jendoubi [Sat, 19 Jun 2010 15:13:04 +0000 (16:13 +0100)]
Subref-blessing method seems to work better

Next will check if accessors can be used
modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoBlessing glob not working
Ryan Jendoubi [Sat, 19 Jun 2010 14:53:27 +0000 (15:53 +0100)]
Blessing glob not working

Not sure why, going to try blessing coderef instead
modified:   lib/Ctypes/Function.pm
modified:   t/002-Function.t

7 years agoNew Ctypes::Function test (failing)
Ryan Jendoubi [Sat, 19 Jun 2010 12:18:27 +0000 (13:18 +0100)]
New Ctypes::Function test (failing)

Ironing out syntax bugs - not sure of logic yet
new file:   t/002-Function.t

modified:   lib/Ctypes/Function.pm

7 years agoPart way through creating Ctypes::Function
Ryan Jendoubi [Fri, 18 Jun 2010 20:32:27 +0000 (21:32 +0100)]
Part way through creating Ctypes::Function

Quite like the equivalent in FFI.pm. Using libffi makes it much
simpler than C::DL or P5NCI.
new file:   lib/Ctypes/Function.pm

7 years agoCreated some Perl-side type checking for numeric args
Ryan Jendoubi [Thu, 17 Jun 2010 02:16:14 +0000 (03:16 +0100)]
Created some Perl-side type checking for numeric args

Simple effect of calling ord() on a string passed where an 'i'
argtype has been specified. Should probably warn about that.
Should this be done in C instead?

modified:   Ctypes.xs
modified:   lib/Ctypes.pm
modified:   t/001-math.t

7 years agoAdded passing test to highlight ffi_arg issue (ret type size)
Ryan Jendoubi [Thu, 17 Jun 2010 01:06:08 +0000 (02:06 +0100)]
Added passing test to highlight ffi_arg issue (ret type size)

1 main test passes on my 32bit Debian Linux and 1 fails.
Passes when rvalue is an int, but fails when it's double
(as ffi_arg has 4 bytes, double 8 bytes on this system).
modified:   Ctypes.xs
modified:   t/001-math.t

7 years agoAdded patches 4-6 (1-3 already in master)
Ryan Jendoubi [Wed, 16 Jun 2010 22:14:04 +0000 (23:14 +0100)]
Added patches 4-6 (1-3 already in master)

Patch description:
4: set rtype, fixes ffi_prep_cif call
5: Fix c++-style comments to ANSI C Remove call with uninitialized
   rvalue Fix return types
6: proper error messages

modified:   Ctypes.xs

7 years agoproper error messages
Reini Urban [Wed, 16 Jun 2010 21:22:11 +0000 (23:22 +0200)]
proper error messages

7 years agoFix c++-style comments to ANSI C
Reini Urban [Wed, 16 Jun 2010 21:14:41 +0000 (23:14 +0200)]
Fix c++-style comments to ANSI C
Remove call with uninitialized rvalue
Fix return types

7 years agoset rtype, fixes ffi_prep_cif call
Reini Urban [Wed, 16 Jun 2010 21:00:55 +0000 (23:00 +0200)]
set rtype, fixes ffi_prep_cif call

7 years agomerge origin
Reini Urban [Wed, 16 Jun 2010 20:52:09 +0000 (22:52 +0200)]
merge origin

7 years agoFixed sigsegv after adding ffi_arg for rvalue
Ryan Jendoubi [Tue, 15 Jun 2010 22:52:30 +0000 (23:52 +0100)]
Fixed sigsegv after adding ffi_arg for rvalue

Now need to correct the stack (erroring after leaving XSUB).
modified:   Ctypes.xs
modified:   Makefile.PL
modified:   t/000-load.t

7 years agoUpdated debugging options
Ryan Jendoubi [Tue, 15 Jun 2010 00:19:00 +0000 (01:19 +0100)]
Updated debugging options

Replaced multitude of messy ifdefs with one variadic ifdef.
Added -DCTYPES_DEBUG option to Makefile.PL (commendted out).
modified:   Ctypes.xs
modified:   Makefile.PL

7 years agoMerge branch 'new' - patches from rurban
Ryan Jendoubi [Mon, 14 Jun 2010 23:43:35 +0000 (00:43 +0100)]
Merge branch 'new' - patches from rurban

7 years ago"Change" to const-c.inc: proper non-win32 hashbang
Ryan Jendoubi [Mon, 14 Jun 2010 23:42:59 +0000 (00:42 +0100)]
"Change" to const-c.inc: proper non-win32 hashbang
modified:   const-c.inc

7 years agoSomething else
Ryan Jendoubi [Mon, 14 Jun 2010 23:32:52 +0000 (00:32 +0100)]
Something else

7 years agoSomething
Ryan Jendoubi [Mon, 14 Jun 2010 21:47:46 +0000 (22:47 +0100)]
Something

7 years agoadded typemap for ffi_type
Reini Urban [Sun, 13 Jun 2010 20:01:52 +0000 (22:01 +0200)]
added typemap for ffi_type

7 years agofix perms
Reini Urban [Sun, 13 Jun 2010 19:03:01 +0000 (21:03 +0200)]
fix perms
add const-*.inc
fix pod
add Makefile depend section

7 years agoproper ffi_arg rvalue
Reini Urban [Sun, 13 Jun 2010 18:28:43 +0000 (20:28 +0200)]
proper ffi_arg rvalue
use call ABI
improve 001-math.t

7 years agoChanged use verison 5.10.1 -> 5.10
Ryan Jendoubi [Sat, 12 Jun 2010 08:26:57 +0000 (09:26 +0100)]
Changed use verison 5.10.1 -> 5.10

Not sure what I should do about ppport.h?

With thanks to Robin Smidsrød.
modified:   Makefile.PL
modified:   lib/Ctypes.pm

7 years agoAdded support (or at least recognition) of void return types
Ryan Jendoubi [Tue, 8 Jun 2010 20:27:00 +0000 (21:27 +0100)]
Added support (or at least recognition) of void return types
modified:   Ctypes.xs

7 years agoMaking 001-math.t work on MSWin32.
Ryan Jendoubi [Tue, 8 Jun 2010 16:55:02 +0000 (17:55 +0100)]
Making 001-math.t work on MSWin32.

Merge gitorious.org:perl-ctypes/perl-ctypes

Conflicts:
Changes
README
lib/Ctypes.pm

modified:   t/001-math.t

7 years agoThink this might have been caused by line ending changes
Ryan Jendoubi [Tue, 8 Jun 2010 16:41:39 +0000 (17:41 +0100)]
Think this might have been caused by line ending changes

7 years agoChanged var names in t/001-math.t
Ryan Jendoubi [Tue, 8 Jun 2010 16:37:29 +0000 (17:37 +0100)]
Changed var names in t/001-math.t

7 years agoMerge branch 'linux'
Ryan Jendoubi [Tue, 8 Jun 2010 10:52:24 +0000 (11:52 +0100)]
Merge branch 'linux'

Conflicts:
.gitignore
Changes
Ctypes.xs
MANIFEST
Makefile.PL
README
lib/Ctypes.pm

7 years agoMerge gitorious.org:perl-ctypes/perl-ctypes into linux
Ryan Jendoubi [Tue, 8 Jun 2010 10:39:45 +0000 (11:39 +0100)]
Merge gitorious.org:perl-ctypes/perl-ctypes into linux

Conflicts:
.gitignore
ignore.txt
include/const-c.inc
t/000-load.t
t/001-math.t

7 years agoCommit because of line changes?
Ryan Jendoubi [Tue, 8 Jun 2010 10:12:46 +0000 (11:12 +0100)]
Commit because of line changes?

7 years agoChanges from a straight cp -r from Linux
Ryan Jendoubi [Tue, 8 Jun 2010 10:07:41 +0000 (11:07 +0100)]
Changes from a straight cp -r from Linux

7 years agoGot basic ffi_call working (properly this time [I think ])
doubi [Tue, 8 Jun 2010 03:24:59 +0000 (04:24 +0100)]
Got basic ffi_call working (properly this time [I think ])

Made did Newxc(result, 1, <type>, <type>) based on the func sig,
to make *result actually assignable-to; before it was just a
pointer to ffi_type, silly.

Moved main ffi headers one dir up from /include/win32, being
common across platforms as they are. Might have to think later
about making sure gcc will find headers for more recent locally
installed versions first.

Also spent some time tidying up the manifest and suchlike. We
have an ignore.txt, .gitignore and a MANIFEST.SKIP - seems
a little redundant.
Committer: doubi <doubi@doubuntu.(none)>
modified:   Ctypes.xs
new file:   MANIFEST.SKIP
renamed:    include/win32/ffi.h -> include/ffi.h
renamed:    include/win32/ffi_common.h -> include/ffi_common.h
renamed:    include/win32/ffitarget.h -> include/ffitarget.h

7 years agoInitial commit (from Ubuntu 10.4)
doubi [Tue, 8 Jun 2010 00:53:23 +0000 (01:53 +0100)]
Initial commit (from Ubuntu 10.4)

7 years agoIncorporated rurban's Ctypes.xs
doubi [Tue, 8 Jun 2010 00:41:25 +0000 (01:41 +0100)]
Incorporated rurban's Ctypes.xs