From owner-acpi-jp@jp.freebsd.org  Tue Feb  8 02:40:56 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id CAA70796;
	Tue, 8 Feb 2000 02:40:56 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id CAA70791
	for <acpi-jp@jp.freebsd.org>; Tue, 8 Feb 2000 02:40:56 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (isdn23.imasy.or.jp [202.227.24.215])
	by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id CAA16372
	for <acpi-jp@jp.freebsd.org>; Tue, 8 Feb 2000 02:40:51 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Message-Id: <200002071740.CAA16372@tasogare.imasy.or.jp>
To: acpi-jp@jp.freebsd.org
In-Reply-To: Your message of "Mon, 07 Feb 2000 23:19:01 +0900"
	<200002071419.XAA13333@shidahara1.planet.sci.kobe-u.ac.jp>
References: <200002071419.XAA13333@shidahara1.planet.sci.kobe-u.ac.jp>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Date: Tue, 08 Feb 2000 02:40:50 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 980905(IM100)
Lines: 162
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990727
X-Sequence: acpi-jp 264
Subject: [acpi-jp 264] Re: Destroy Objects 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

> >$B$&!<$`!"$3$&$$$&%1!<%9$b$"$k$s$G$9$M$'(B...
> >
> >-                       if (name->property->meth.argnum) {
> >+                       argnum = name->property->meth.argnum & 0x07;
> >+                       if (argnum) {
> 
> argnum$B$N(B2^3$B$N0L$O%7%j%"%i%$%:%k!<%k$G$9!#(B

Grrrrr.

> $B$H$3$m$G!"(BReference$B$N7o$G(BC++$B$N(Bauto_ptr$B$_$?$$$J$N$r<BAu$9$l$P!)(B
> $B$HD>@\$$$C$F$/$l$??M$,$$$^$7$?$,(B...$B$d$C$Q$j%j%U%!%l%s%9%+%&%s%H$H$+(B
> $BI,MW$J$N$+$J$!!#(B

RefOf $B$d(B Index $B$N(B Objref $BMm$_$NLdBj$N$3$H$@$C$?$i!"(BRefOf $B$9$k;~$K(B
Object property $B$7$+2!$($F$$$J$$$N$,GT0x$C$]$/$FNN0h3NJ]$7$F$J$+$C$?$i(B
$B8e!9LLE]$J$3$H$K$J$k$N$G!"0l$D>e$N%l%Y%k(B Named Object $B$r2!$($F$*$$$F(B
$BI,MW$K1~$8$F(B property $B$r$$$8$k%Q%C%A$r:n$C$F$_$^$7$?!#(B
$B$?$@$7!"(BRefOf $B$N0z?t$KD>@\(B aml_name $B$,Mh$k$3$H$rA0Ds$H$7$F$$$^$9(B (^^;
# $B9,$$:#$N$H$3$m$O$=$&$$$&Iw$J(B AML $B$@$1$G$9$,(B...$B$G$b(B parse $B$N;EJ}$+$i8+$F(B
# $B$3$l$G$$$$$N$+$b(B?

$B:#F|$+$i0l=54V=PD%Ey$GF0$1$J$$$N$G!"$b$9$3$7$^$H$b$J2r7h$,$"$l$P$*G$$;$7$^$9!#(B

Index: debug.c
===================================================================
RCS file: /home/cvs/ACPI/util/acpiconf/debug.c,v
retrieving revision 1.7
diff -u -r1.7 debug.c
--- debug.c	2000/01/27 16:00:14	1.7
+++ debug.c	2000/02/07 14:27:30
@@ -434,7 +434,7 @@
 			printf(" (offset %d)", obj->objref.offset);
 		}
 		printf(" of ");
-		showobject(*(obj->objref.ref));
+		showobject(obj->objref.ref);
 		break;
 	default:
 		printf("UNK ID=%d\n", obj->type);
Index: evalobj.c
===================================================================
RCS file: /home/cvs/ACPI/util/acpiconf/evalobj.c,v
retrieving revision 1.9
diff -u -r1.9 evalobj.c
--- evalobj.c	2000/01/27 16:00:14	1.9
+++ evalobj.c	2000/02/07 16:59:48
@@ -159,7 +159,7 @@
 			ret = obj = aname->property;
 			num1.type = aml_t_num;
 			offset = obj->objref.offset;
-			ref = *(obj->objref.ref);
+			ref = obj->objref.ref;
 			if (ref == NULL) {
 				aname->property = ret;
 				return aname->property;
Index: obj.h
===================================================================
RCS file: /home/cvs/ACPI/util/acpiconf/obj.h,v
retrieving revision 1.5
diff -u -r1.5 obj.h
--- obj.h	2000/01/27 16:00:14	1.5
+++ obj.h	2000/02/07 16:51:16
@@ -146,7 +146,8 @@
 };
 struct aml_objref {
 	enum aml_objtype type;
-	union aml_object **ref;
+	struct aml_name *nameref;
+	union aml_object *ref;
 	int             offset;	/* of aml_buffer.data or aml_package.objects. */
 	/* if negative value, not ready to dereference for element access. */
 	unsigned	deref;	/* indicates whether dereffenced or not */
Index: parse.c
===================================================================
RCS file: /home/cvs/ACPI/util/acpiconf/parse.c,v
retrieving revision 1.17
diff -u -r1.17 parse.c
--- parse.c	2000/01/27 16:00:14	1.17
+++ parse.c	2000/02/07 16:50:42
@@ -1322,7 +1322,8 @@
 
 		objref = acpi_alloc_object(aml_t_objref, NULL);
 		acpi_register_temporary_object(env, objref);
-		objref->objref.ref = &src->property;
+		objref->objref.nameref = src;
+		objref->objref.ref = src->property;
 		objref->objref.offset = -1;	/* deferent from IndexOp */
 		objref->objref.deref = 0;
 		env->work.property = objref;
@@ -1448,17 +1449,17 @@
 		objref = acpi_eval_name(env, acpi_parse_termobj(env, indent));
 		DPRINT(")");
 
-		if ((*(objref->objref.ref)) == NULL) {
-			env->work.property = *(objref->objref.ref);
+		if (objref->objref.ref == NULL) {
+			env->work.property = objref->objref.ref;
 			aname = &env->work;
 			break;
 		}
 
-		switch ((*(objref->objref.ref))->type) {
+		switch (objref->objref.ref->type) {
 		case aml_t_package:
 		case aml_t_buffer:
 			if (objref->objref.offset < 0) {
-				env->work.property = *(objref->objref.ref);
+				env->work.property = objref->objref.ref;
 				if (objref != &env->wobj) {
 					acpi_free_object(&objref);
 				}
@@ -1468,7 +1469,7 @@
 			}
 			break;
 		default:
-			env->work.property = *(objref->objref.ref);
+			env->work.property = objref->objref.ref;
 			break;
 		}
 
@@ -1531,7 +1532,7 @@
 		case aml_t_buffer:
 			objref = acpi_alloc_object(aml_t_objref, NULL);
 			acpi_register_temporary_object(env, objref);
-			objref->objref.ref = &srcobj;
+			objref->objref.ref = srcobj;
 			objref->objref.offset = num1;
 			objref->objref.deref = 0;
 			break;
Index: store.c
===================================================================
RCS file: /home/cvs/ACPI/util/acpiconf/store.c,v
retrieving revision 1.7
diff -u -r1.7 store.c
--- store.c	2000/01/27 16:00:14	1.7
+++ store.c	2000/02/07 16:53:49
@@ -181,11 +181,12 @@
 	int	offset;
 	union aml_object *ref;
 
-	if (*(r->objref.ref) == NULL) {
-		*(r->objref.ref) = acpi_alloc_object(obj->type, NULL);
+	if (r->objref.ref == NULL) {
+		r->objref.ref = acpi_alloc_object(obj->type, NULL);/* XXX */
+		r->objref.nameref->property = r->objref.ref;
 	}
 
-	ref = *(r->objref.ref);
+	ref = r->objref.ref;
 
 	switch(ref->type){
 	case aml_t_buffer:
@@ -195,7 +196,7 @@
 
 	case aml_t_package:
 		offset = r->objref.offset;
-		if ((*(r->objref.ref))->package.elements < offset) {
+		if (r->objref.ref->package.elements < offset) {
 			acpi_realloc_object(ref, offset);
 		}
 		if (ref->package.objects[offset] == NULL) {
