1 /* -----------------------------------------------------------------------------
2 * See the LICENSE file for information on copyright, usage and redistribution
3 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
7 * This file contains the runtime support for Pike modules
8 * and includes code for managing global variables and pointer
10 * ----------------------------------------------------------------------------- */
21 /* Stores information about a wrapped object */
22 typedef struct swig_object_wrapper {
25 } swig_object_wrapper;
30 #define THIS (((swig_object_wrapper *) Pike_fp->current_storage)->self)
32 #define SWIG_ConvertPtr SWIG_Pike_ConvertPtr
33 #define SWIG_NewPointerObj SWIG_Pike_NewPointerObj
34 #define SWIG_GetModule(clientdata) SWIG_Pike_GetModule()
35 #define SWIG_SetModule(clientdata, pointer) SWIG_Pike_SetModule(pointer)
37 /* These need to be filled in before type sharing between modules will work */
38 static swig_module_info *SWIG_Pike_GetModule() {
42 static void SWIG_Pike_SetModule(swig_module_info *pointer) {
46 /* Convert a pointer value */
48 SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int flags) {
51 swig_object_wrapper *obj_wrapper;
54 pr = (struct program *) ty->clientdata;
55 obj_wrapper = (swig_object_wrapper *) get_storage(obj, pr);
56 if (obj_wrapper && obj_wrapper->type) {
57 tc = SWIG_TypeCheckStruct(obj_wrapper->type, ty);
60 *ptr = SWIG_TypeCast(tc, obj_wrapper->self, &newmemory);
61 assert(!newmemory); /* newmemory handling not yet implemented */
69 /* Create a new pointer object */
70 static struct object *
71 SWIG_Pike_NewPointerObj(void *ptr, swig_type_info *type, int own) {