mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Add FFI interface to NSInvocation and NSConnection
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
68bda2e25c
commit
948cbdcbb3
28 changed files with 3985 additions and 730 deletions
50
Source/cifframe.h
Normal file
50
Source/cifframe.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* cifframe - Wrapper/Objective-C interface for ffi function interface
|
||||
|
||||
Copyright (C) 1999, Free Software Foundation, Inc.
|
||||
|
||||
Written by: Adam Fedor <fedor@gnu.org>
|
||||
Created: Feb 2000
|
||||
|
||||
This file is part of the GNUstep Base Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef cifframe_h_INCLUDE
|
||||
#define cifframe_h_INCLUDE
|
||||
|
||||
#include <ffi.h>
|
||||
#include <base/preface.h>
|
||||
|
||||
typedef struct _cifframe_t {
|
||||
ffi_cif cif;
|
||||
int nargs;
|
||||
ffi_type *rtype;
|
||||
ffi_type **args;
|
||||
void **values;
|
||||
} cifframe_t;
|
||||
|
||||
extern cifframe_t *cifframe_from_sig (const char *typePtr, void **retval);
|
||||
extern void cifframe_free(cifframe_t *cframe);
|
||||
extern void cifframe_set_arg(cifframe_t *cframe, int index, void *buffer);
|
||||
extern void cifframe_get_arg(cifframe_t *cframe, int index, void *buffer);
|
||||
extern void *cifframe_arg_addr(cifframe_t *cframe, int index);
|
||||
extern BOOL cifframe_decode_return (const char *type, void* buffer);
|
||||
|
||||
extern void cifframe_do_call (const char *encoded_types,
|
||||
void(*decoder)(int,void*,const char*),
|
||||
void(*encoder)(int,void*,const char*,int));
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue