- Updated documentation to use CSS and <div> instead of blockquotes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bc96925c9d
commit
13ad5fff85
35 changed files with 8013 additions and 4099 deletions
|
|
@ -3,15 +3,18 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>SWIG and MzScheme</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css"/>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
|
||||
<H1><a name="MzScheme"></a>21 SWIG and MzScheme</H1>
|
||||
<!-- INDEX -->
|
||||
<div class="sectiontoc">
|
||||
<ul>
|
||||
<li><a href="#MzScheme_nn2">Creating native MzScheme structures</a>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- INDEX -->
|
||||
|
||||
|
||||
|
|
@ -22,8 +25,11 @@ This section contains information on SWIG's support of MzScheme.
|
|||
<H2><a name="MzScheme_nn2"></a>21.1 Creating native MzScheme structures</H2>
|
||||
|
||||
|
||||
<p>
|
||||
Example interface file:
|
||||
<blockquote>
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
/* define a macro for the struct creation */
|
||||
%define handle_ptr(TYPE,NAME)
|
||||
|
|
@ -40,10 +46,13 @@ Example interface file:
|
|||
/* setup the typemaps for the pointer to an output parameter cntrs */
|
||||
handle_ptr(struct diag_cntrs, cntrs);
|
||||
</pre>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Then in scheme, you can use regular struct access procedures like
|
||||
<blockquote>
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
; suppose a function created a struct foo as
|
||||
; (define foo (make-diag-cntrs (#x1 #x2 #x3) (make-inspector))
|
||||
|
|
@ -52,9 +61,11 @@ Then in scheme, you can use regular struct access procedures like
|
|||
(format "0x~x" (diag-cntrs-field2 foo))
|
||||
;etc...
|
||||
</pre>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
That's pretty much it. It works with nested structs as well.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue