changeset 57:ce844f6c504d

modify __rectype
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Sun, 25 Dec 2011 04:28:23 +0900
parents 46cc88d1051c
children 97457764428f
files presen/index.html
diffstat 1 files changed, 35 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/presen/index.html	Sat Dec 24 20:58:48 2011 +0900
+++ b/presen/index.html	Sun Dec 25 04:28:23 2011 +0900
@@ -267,7 +267,15 @@
       <!-- PAGE -->
       <div class="slide">
 	<h1></h1>
+	<pre>
+typedef struct node {
+ selftype *right;
+ selftype *left;
+}*NODE	  
+	</pre>
+
 	<li></li>
+
       </div>
       <!-- PAGE -->
       <div class="slide">
@@ -325,18 +333,36 @@
       </div>
       <!-- PAGE -->
       <div class="slide">
-	<h1></h1>
-	<li></li>
+	<h1>__rectype の実装</h1>
+	<li>通常、関数の引数に関数ポインタを渡した際は以下の様に使われる。</li>
+	<small>
+	<pre>
+void factorial(int n, int result, void(*print)()){
+   :
+   (*print)(n,result,print,exit1, envp);
+}
+	</pre>
+	</small>
+	<li>以下の様に扱えるようにしたい。</li>
+	<small>
+	<pre>
+void factorial(int n, int result, void *print){
+   :
+   (*print)(n,result,print,exit1, envp);
+}
+	</pre>
+</small>
       </div>
       <!-- PAGE -->
       <div class="slide">
-	<h1></h1>
-	<li></li>
-      </div>
-      <!-- PAGE -->
-      <div class="slide">
-	<h1></h1>
-	<li></li>
+	<h1>__rectype の実装</h1>
+	<li>そこで、__rectype という予約後を作り、以下の宣言を行えるようにした。</li>
+	<pre>
+__code factorial(int n, int result, __rectype *print) {
+   :
+   (*print)(n,result,print,exit1, envp);
+}
+	</pre>
       </div>
       <!-- PAGE -->
       <div class="slide">