summaryrefslogtreecommitdiff
path: root/gpspacket.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-12-15 13:03:49 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-12-15 13:03:49 +0000
commit1dfd7aaf235e81b54f5daa1a2f6191dddee55dc4 (patch)
tree8ee7d41a71cdeb45e50ce6ec4f4c34b3c8b24048 /gpspacket.c
parent4b28341b737720a1cf0ae4dc3e69ecf45c3cc711 (diff)
downloadgpsd-1dfd7aaf235e81b54f5daa1a2f6191dddee55dc4.tar.gz
Put Python extension modules under "gps.".
The two Python extension modules used for our distribution test clients, gpslib and gpspacket, are now parts of an importable gps package. This change is needed so xgps2 (which is about to replace xgps) can depend only on being able to do "import gps". All regression tests pass.
Diffstat (limited to 'gpspacket.c')
-rw-r--r--gpspacket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gpspacket.c b/gpspacket.c
index d6d05fd0..76b3e19b 100644
--- a/gpspacket.c
+++ b/gpspacket.c
@@ -73,7 +73,7 @@ Lexer_get(LexerObject *self, PyObject *args)
ssize_t len;
int fd;
- if (!PyArg_ParseTuple(args, "i;missing or invalid file descriptor argument to gpspacket.get", &fd))
+ if (!PyArg_ParseTuple(args, "i;missing or invalid file descriptor argument to gps.packet.get", &fd))
return NULL;
len = packet_get(fd, &self->lexer);
@@ -126,7 +126,7 @@ static PyTypeObject Lexer_Type = {
* to be portable to Windows without using C++. */
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
- "gpspacket.lexer", /*tp_name*/
+ "gps.packet.lexer", /*tp_name*/
sizeof(LexerObject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
@@ -216,7 +216,7 @@ register_report(LexerObject *self, PyObject *args)
/* List of functions defined in the module */
-static PyMethodDef gpspacket_methods[] = {
+static PyMethodDef packet_methods[] = {
{"new", gpspacket_new, METH_VARARGS,
PyDoc_STR("new() -> new packet-lexer object")},
{"register_report", (PyCFunction)register_report, METH_VARARGS,
@@ -238,7 +238,7 @@ level of the message and the message itself.\n\
");
PyMODINIT_FUNC
-initgpspacket(void)
+initpacket(void)
{
PyObject *m;
@@ -246,7 +246,7 @@ initgpspacket(void)
return;
/* Create the module and add the functions */
- m = Py_InitModule3("gpspacket", gpspacket_methods, module_doc);
+ m = Py_InitModule3("packet", packet_methods, module_doc);
PyModule_AddIntConstant(m, "BAD_PACKET", BAD_PACKET);
PyModule_AddIntConstant(m, "COMMENT_PACKET", COMMENT_PACKET);