cvsuser 04/03/01 08:55:28
Modified: include/parrot objects.h
src objects.c
Log:
Stub in the low-level metamethod finding code
Revision Changes Path
1.18 +7 -1 parrot/include/parrot/objects.h
Index: objects.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/objects.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- objects.h 25 Feb 2004 20:49:40 -0000 1.17
+++ objects.h 1 Mar 2004 16:55:25 -0000 1.18
@@ -1,7 +1,7 @@
/* objects.h
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: objects.h,v 1.17 2004/02/25 20:49:40 dan Exp $
+ * $Id: objects.h,v 1.18 2004/03/01 16:55:25 dan Exp $
* Overview:
* Parrot class and object header stuff
* Data Structure and Algorithms:
@@ -51,6 +51,12 @@
void Parrot_set_attrib_by_num(Parrot_Interp, PMC *, INTVAL, PMC *);
INTVAL Parrot_get_attrib_num(Parrot_Interp, PMC *, STRING *);
INTVAL Parrot_class_offset(Parrot_Interp, PMC *, STRING *);
+PMC *Parrot_find_class_constructor(Parrot_Interp, STRING *, INTVAL);
+PMC *Parrot_find_class_destructor(Parrot_Interp, STRING *, INTVAL);
+PMC *Parrot_find_class_fallback(Parrot_Interp, STRING *, INTVAL);
+void Parrot_set_class_constructor(Parrot_Interp, STRING *, INTVAL, STRING *);
+void Parrot_set_class_destructor(Parrot_Interp, STRING *, INTVAL, STRING *);
+void Parrot_set_class_fallback(Parrot_Interp, STRING *, INTVAL, STRING *);
#endif
1.46 +46 -1 parrot/src/objects.c
Index: objects.c
===================================================================
RCS file: /cvs/public/parrot/src/objects.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -w -r1.45 -r1.46
--- objects.c 26 Feb 2004 17:10:27 -0000 1.45
+++ objects.c 1 Mar 2004 16:55:28 -0000 1.46
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: objects.c,v 1.45 2004/02/26 17:10:27 leo Exp $
+$Id: objects.c,v 1.46 2004/03/01 16:55:28 dan Exp $
=head1 NAME
@@ -863,6 +863,51 @@
offset = -1;
}
return offset;
+}
+
+/*
+
+=item C<PMC *
+Parrot_find_class_constructor(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken)>
+
+Find and return the constructor method PMC for the named sub. The
+classtoken is an identifier for the class used for fast lookup, or 0
+if you don't have an identifier token. Which, as they're currently
+undefined, is pretty likely
+
+*/
+
+PMC *
+Parrot_find_class_constructor(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken)
+{
+ return NULL;
+}
+
+PMC *
+Parrot_find_class_destructor(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken)
+{
+ return NULL;
+}
+
+PMC *
+Parrot_find_class_fallback(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken)
+{
+ return NULL;
+}
+
+void
+Parrot_set_class_constructor(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken, STRING *method)
+{
+}
+
+void
+Parrot_set_class_destructor(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken, STRING *method)
+{
+}
+
+void
+Parrot_set_class_fallback(Parrot_Interp interpreter, STRING *class, INTVAL
classtoken, STRING *method)
+{
}
/*