RAA - import

import / 1.0

Short description: Import - import dynamic library
Category: Library/Hacks
Status: usable
Created: 2002-10-24 09:41:50 GMT
Last update: -
Owner: Auroux Lionel (Projects of this owner)
Homepage: http://www.epita.fr:8000/~auroux_l/
Download: http://www.epita.fr:8000/~auroux_l/import-0.1.tgz
License: Ruby's
Dependency:
None
Description:

This module allows you to call all functions of any dynamic library.
Import translate ruby variables into c with a perlish pack syntax.

ex:
require 'import.so'
libc = Import.new '/usr/lib/libc.so'
libc.load_func ('write', 'vipi')
libc.load_func ('puts', 'vp')

libc.write 1,'Chmeulle',4
libc.write 1,"\n",1
libc.puts "Great It's Work\n" "I love Dynamic library\n"

Future:
Parse header
Direct c prototype like:
libc.load_proto <<-"fin"
char *strerror(int);
fin

Edit this project (for project owner)

back to RAA top