comparison lua/luadyncall/doc/guide.tex @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1 \documentclass{article}
2 \begin{document}
3 \section{Introduction}
4
5 The luadyncall package is a framework for writing system-level software
6 using lua.
7
8 It uses the libraries from the DynCall Project for the low-level implementation
9 such as code loading, symbol resolving and invocation of function calls.
10
11 It implements the portable dynamic linkage system 'dynport' for lua which
12 allows to bind whole shared C libraries with a single command.
13
14 \section{Overview}
15
16 This package provides the following extensions:
17
18 \begin{description}
19 \item [dynload] dynamic loading of code and resolving of C functions
20 \item [dyncall] dynamic calling of loaded C functions
21 \item [dynport] dynamic binding of whole shared C libraries
22 \item [array] allocate and access C-typed arrays
23 \item [smartptr] smart pointer utility
24 \item [int64] 64-bit (unsigned) integer datatype for lua
25 \item [ldynguess] guess the operating system
26 \end{description}
27
28 \section{C Pointers}
29
30 One major issue was to decide how to handle pointer values and in
31 particular NULL pointers using dynports.
32
33 Lua can compare pointer-values. The current dyncall implementation comes with
34 a function \verb@topointer(value)@ which makes a pointer value from an integer
35 value. There is also a \verb@NULL@ variable which holds a pointer value of 0.
36
37 \section{Dynport}
38
39 \subsection {The LDP\_PATH environment variable}
40
41 The variable contains the patterns to search for dynport files when
42 \verb@dynport("someport")@ is called.
43
44 \end{document}
45