Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 6352:b62a7a59414e legacy-trunk
Get DLL version from a variable.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 29 Sep 1997 23:34:23 +0000 |
| parents | 1f2dfca52207 |
| children | f406ec35bfca |
comparison
equal
deleted
inserted
replaced
| 6351:3864df294979 | 6352:b62a7a59414e |
|---|---|
| 52 #include <unistd.h> | 52 #include <unistd.h> |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 #ifdef MS_COREDLL | 55 #ifdef MS_COREDLL |
| 56 extern void *PyWin_DLLhModule; | 56 extern void *PyWin_DLLhModule; |
| 57 /* A string loaded from the DLL at startup: */ | |
| 58 extern const char *PyWin_DLLVersionString; | |
| 57 #endif | 59 #endif |
| 58 | 60 |
| 59 PyObject * | 61 PyObject * |
| 60 PySys_GetObject(name) | 62 PySys_GetObject(name) |
| 61 char *name; | 63 char *name; |
| 317 #ifdef MS_COREDLL | 319 #ifdef MS_COREDLL |
| 318 PyDict_SetItemString(sysdict, "dllhandle", | 320 PyDict_SetItemString(sysdict, "dllhandle", |
| 319 v = PyInt_FromLong((int)PyWin_DLLhModule)); | 321 v = PyInt_FromLong((int)PyWin_DLLhModule)); |
| 320 Py_XDECREF(v); | 322 Py_XDECREF(v); |
| 321 PyDict_SetItemString(sysdict, "winver", | 323 PyDict_SetItemString(sysdict, "winver", |
| 322 v = PyString_FromString(MS_DLL_ID)); | 324 v = PyString_FromString(PyWin_DLLVersionString)); |
| 323 Py_XDECREF(v); | 325 Py_XDECREF(v); |
| 324 #endif | 326 #endif |
| 325 if (PyErr_Occurred()) | 327 if (PyErr_Occurred()) |
| 326 return NULL; | 328 return NULL; |
| 327 return m; | 329 return m; |
