Exemplo n.º 1
0
  (cmpfunc)TimeStamp_compare,	/*tp_compare*/
  (reprfunc)TimeStamp_repr,		/*tp_repr*/
  0,		/*tp_as_number*/
  0,		/*tp_as_sequence*/
  0,		/*tp_as_mapping*/
  (hashfunc)TimeStamp_hash,		/*tp_hash*/
  (ternaryfunc)0,	/*tp_call*/
  (reprfunc)TimeStamp_str,		/*tp_str*/
  (getattrofunc)TimeStamp_getattro,
  (setattrofunc)0,
  
  /* Space for future expansion */
  0L,0L,
  "Simple time stamps"
#ifdef USE_EXTENSION_CLASS
  , METHOD_CHAIN(TimeStamp_methods),
#endif
};

static struct PyMethodDef Module_Level__methods[] = {
#ifndef USE_EXTENSION_CLASS
  {"TimeStamp", (PyCFunction)newTimeStamp, METH_VARARGS, ""},
#endif
  {NULL, (PyCFunction)NULL, 0, NULL}		/* sentinel */
};

void
initTimeStamp(void)
{
  PyObject *m, *d, *s;
Exemplo n.º 2
0
  0,					/*tp_as_sequence*/
  0,					/*tp_as_mapping*/
  (hashfunc)0,				/*tp_hash*/
  (ternaryfunc)Missing_call,		/*tp_call*/
  (reprfunc)Missing_str,		/*tp_str*/
  (getattrofunc)Missing_getattr,	/*tp_getattro*/
  (setattrofunc)0,			/*tp_setattro*/

  /* Space for future expansion */
  0L,0L,
  "Represent totally unknown quantities\n"
  "\n"
  "Missing values are used to represent numeric quantities that are\n"
  "unknown.  They support all mathematical operations except\n"
  "conversions by returning themselves.\n",
  METHOD_CHAIN(NULL)
};

/* End of code for Missing objects */
/* -------------------------------------------------------- */


/* List of methods defined in the module */

static struct PyMethodDef Module_Level__methods[] = {
  {NULL, (PyCFunction)NULL, 0, NULL}		/* sentinel */
};

void
init_Missing(void)
{