- Improve the runtime type sytesm

- Update all languages to new type system
- Add DohSortList function
- Fix mzscheme Examples/Makefile


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
John Lenz 2005-02-01 00:08:24 +00:00
commit f6964f285f
48 changed files with 1383 additions and 1021 deletions

View file

@ -6,10 +6,11 @@
*/
%runtime "swigrun.swg" // Common C API type-checking code
%runtime "common.swg" // common type checking code
%runtime "php4run.swg" // Php4 runtime functions
%include "utils.i" // building blocks
%init "swiginit.swg"
/* Typemaps for input parameters by value */
%typemap(in) int, unsigned int, unsigned short, short, unsigned short, long, unsigned long, signed char, unsigned char, enum SWIGTYPE %{
@ -502,6 +503,11 @@ deliberate error cos this code looks bogus to me
%apply unsigned long { size_t };
%init %{
SWIG_php_minit {
SWIG_InitializeModule(0);
%}
/* php kewords */
/* please test and activate */
//%include "phpkw.swg"

View file

@ -31,6 +31,10 @@ extern "C" {
}
#endif
/* Standard SWIG API */
#define SWIG_GetModule(clientdata) SWIG_Php4_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php4_SetModule(pointer)
/* used to wrap returned objects in so we know whether they are newobject
and need freeing, or not */
typedef struct _swig_object_wrapper {
@ -106,7 +110,7 @@ static int
SWIG_ConvertPtr_(char *c, void **ptr, swig_type_info *ty) {
register int d;
unsigned long p;
swig_type_info *tc;
swig_cast_info *tc;
if(c == NULL) {
*ptr = 0;
@ -161,7 +165,7 @@ type_error:
with the type name hard wired in. */
static int
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
swig_type_info *tc;
swig_cast_info *tc;
if (ty) {
if (! type_name) {
@ -238,3 +242,22 @@ type_error:
return -1;
}
static char const_name[] = "swig_runtime_data_type_pointer";
static swig_module_info *SWIG_Php4_GetModule() {
zval *pointer;
swig_module_info *ret = 0;
MAKE_STD_ZVAL(pointer);
if (zend_get_constant(const_name, sizeof(const_name), pointer)) {
if (pointer->type == IS_LONG) {
ret = (swig_module_info *) pointer->value.lval;
}
}
return 0;
}
static void SWIG_Php4_SetModule(swig_module_info *pointer) {
REGISTER_MAIN_LONG_CONSTANT(const_name, (long) pointer, 0);
}