/* Need to define an internal flag to avoid an extern */ #define LDG_INTERNAL #include "ldg_Python.h" #include #include #include "py_aes.h" /* --- A GEM exception --- */ static PyObject *GEMError; /* --- Python-C API Calls --- */ static void *pycallbacks[PY_API_FCOUNT]; /* --- Python API Bookkeeping --- */ static PyMethodDef GemMethods[] = { /* AES Application Library */ {"appl_init", py_appl_init, METH_VARARGS, "Initialize a GEM application"}, {"appl_exit", py_appl_exit, METH_VARARGS, "Exit a GEM application"}, {"appl_write", py_appl_write, METH_VARARGS, "Send a message to a GEM application"}, /* AES Forms Library */ {"form_alert", py_form_alert, METH_VARARGS, "Display a GEM alert dialog"}, /* AES Resource Library */ {"rsrc_load", py_rsrc_load, METH_VARARGS, "Load a resource into memory"}, {"rsrc_gaddr", py_rsrc_gaddr, METH_VARARGS, "Return an encapsulated memory address of a resource component"}, {NULL,NULL,0,NULL} }; PyMODINIT_FUNC __CDECL initgem(void) { PyObject *m; //printf("Welcome to shared init.\nStandby...\n"); //LPy_InitModule("gem",GemMethods,NULL,NULL); m = Py_InitModule("_gem",GemMethods); GEMError = PyErr_NewException("_gem.error",NULL,NULL); Py_INCREF(GEMError); PyModule_AddObject(m,"error",GEMError); return; } /* --- End Python API Bookkeeping --- */ /* --- LDG Bookkeeping --- */ void __CDECL assign_pycalls(void **calls) { int i; for(i=0;i