From 0a05a8cab0d8aebba976b348acbb755dbd394c4d Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 30 Mar 1996 01:33:05 +0000 Subject: [PATCH] Declare new method names, and comment. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1293 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/base/mframe.h | 48 ++++++++++++++++++++++++++--------- Source/objects/mframe.h | 48 ++++++++++++++++++++++++++--------- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/Headers/gnustep/base/mframe.h b/Headers/gnustep/base/mframe.h index b08a2133e..f4401e6ca 100644 --- a/Headers/gnustep/base/mframe.h +++ b/Headers/gnustep/base/mframe.h @@ -1,8 +1,8 @@ /* Interface for functions that dissect/make method calls - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1996 Free Software Foundation, Inc. Written by: R. Andrew McCallum - Date: Oct 1994 + Created: Oct 1994 This file is part of the GNU Objective C Class Library. @@ -26,18 +26,42 @@ #include -BOOL -dissect_method_call(arglist_t frame, const char *type, - void (*f)(int,void*,const char*,int)); +/* These functions are used to pull apart method calls, and put them + back together again. They are useful for things like distributed + objects, and cross-language communication glue between Objective C + and other languages. */ -retval_t -dissect_method_return(arglist_t frame, const char *type, - BOOL out_parameters, - void(*f)(int,void*,const char*,int)); +/* xxx Currently these function only work with the GNU Objective C + runtime, not the NeXT runtime. */ + + +/* Extract the arguments to a method call, as found in ARGFRAME, + according to type string TYPES, and encode them by calling ENCODER. + Return YES if and only if the method has some pass-by-reference + arguments. */ + +BOOL +mframe_dissect_call (arglist_t argframe, const char *types, + void (*encoder)(int,void*,const char*,int)); + +/* Decode the arguments to a method call by calling DECODER, knowing + what to decode by looking at type string ENCODED_TYPES. Build an + argframe of type arglist_t, and invoke the method. Then encode the + return value and the pass-by-reference values using ENCODER. */ void -make_method_call(const char *forward_type, - void(*fd)(int,void*,const char*), - void(*fe)(int,void*,const char*,int)); +mframe_do_call (const char *encoded_types, + void(*decoder)(int,void*,const char*), + void(*encoder)(int,void*,const char*,int)); + +/* Decode the return value and pass-by-reference arguments using + DECODER, knowning what to decode by looking at type string TYPES + and OUT_PARAMETERS, and put then into ARGFRAME. Return the + retval_t structure that can be passed to __builtin_return(). */ + +retval_t +mframe_build_return (arglist_t argframe, const char *types, + BOOL out_parameters, + void(*decoder)(int,void*,const char*,int)); #endif /* __mframe_h_OBJECTS_INCLUDE */ diff --git a/Source/objects/mframe.h b/Source/objects/mframe.h index b08a2133e..f4401e6ca 100644 --- a/Source/objects/mframe.h +++ b/Source/objects/mframe.h @@ -1,8 +1,8 @@ /* Interface for functions that dissect/make method calls - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1996 Free Software Foundation, Inc. Written by: R. Andrew McCallum - Date: Oct 1994 + Created: Oct 1994 This file is part of the GNU Objective C Class Library. @@ -26,18 +26,42 @@ #include -BOOL -dissect_method_call(arglist_t frame, const char *type, - void (*f)(int,void*,const char*,int)); +/* These functions are used to pull apart method calls, and put them + back together again. They are useful for things like distributed + objects, and cross-language communication glue between Objective C + and other languages. */ -retval_t -dissect_method_return(arglist_t frame, const char *type, - BOOL out_parameters, - void(*f)(int,void*,const char*,int)); +/* xxx Currently these function only work with the GNU Objective C + runtime, not the NeXT runtime. */ + + +/* Extract the arguments to a method call, as found in ARGFRAME, + according to type string TYPES, and encode them by calling ENCODER. + Return YES if and only if the method has some pass-by-reference + arguments. */ + +BOOL +mframe_dissect_call (arglist_t argframe, const char *types, + void (*encoder)(int,void*,const char*,int)); + +/* Decode the arguments to a method call by calling DECODER, knowing + what to decode by looking at type string ENCODED_TYPES. Build an + argframe of type arglist_t, and invoke the method. Then encode the + return value and the pass-by-reference values using ENCODER. */ void -make_method_call(const char *forward_type, - void(*fd)(int,void*,const char*), - void(*fe)(int,void*,const char*,int)); +mframe_do_call (const char *encoded_types, + void(*decoder)(int,void*,const char*), + void(*encoder)(int,void*,const char*,int)); + +/* Decode the return value and pass-by-reference arguments using + DECODER, knowning what to decode by looking at type string TYPES + and OUT_PARAMETERS, and put then into ARGFRAME. Return the + retval_t structure that can be passed to __builtin_return(). */ + +retval_t +mframe_build_return (arglist_t argframe, const char *types, + BOOL out_parameters, + void(*decoder)(int,void*,const char*,int)); #endif /* __mframe_h_OBJECTS_INCLUDE */