| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py_XDECREF is slightly safer than Py_DECREF (not NULL-safe).
https://docs.python.org/3/extending/extending.html
The return value is a brand new object, or it is an existing object
whose reference count has been incremented.
Signed-off-by: Fred Wright <fw@fwright.net>
TESTED:
Verified that gpscat still works. - fw
|
|
|
|
|
| |
Sad, C99 did not actually standardize the defines to invoke
the standard.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are necessary, but not sufficient, changes to make the C
extensions work "polyglot". These are believed to be complete as far
as the C code is concerned, and don't break Python 2 compatibility.
This puts all the stuff that needs to differ between Python 2 and
Python 3 into conditionally-defined macros in a new header file
python_compatibility.h. The definitions assume Python 2.6 or later.
In addition to the things requiring conditionals, the Lexer object was
using the deprecated tp_getattr entry, with a function based on
Py_FindMethod, which is gone in Python 3. However, the newer
tp_getattro entry can be pointed directly to PyObject_GenericGetAttr,
which works in Python 2 and 3.
Packet data returned by the Lexer is now 'bytes' in Python 3, which is
appropriate given that it may contain binary data. However, it means
that packet data can't be passed directly to anything expecting a
'str'. In Python 2, the data is just a 'str' as usual.
TESTED:
Ran "scons build-all check" and xgps (using Python 2.7). Also ran the
daemon and maidenhead-locator tests with Python 2.6.
|
| |
|
|
|
|
|
| |
Currently, debug level 0 is actually LOG_SHOUT.
This change doesn't affect generated binary code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is done so we can add a "log" hook to the pps_thread_t
structure (this is not done yet) and harmonize with the name of the
outer logging function. If that name had been left as gpsd_report()
there would have been scope for bad confusion with the report_hook
member.
Also, remove two stray duplicative printf calls from the NMEA2000 driver
(drivers shouldn't have printfs!) and fix one typo.
This is a step towards factoring out ntplib. For that to happen, the
PPS thread code needs to be decoupled from the core session structure.
No logic changes. Object compatibility preserved. All regression tests pass.
|
| |
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
Some cleanup and testing is still required.
|
|
|
|
|
|
| |
A major step towards eliminating reverse linkage.
All regression tests pass.
|
|
|
|
| |
All regression tests pass.
|
| |
|
| |
|
|
|
|
| |
All regression tests pass. PPS is live.
|
|
|
|
|
|
|
|
| |
This is a large, ugly change. But without it we can't troubleshoot the
ICP/IP-source initialization bug properly - colliding definitions of
gpsd_report() were interfering with error reporting early in gpsd runs.
More cleanup work remains to be done, but at least this is working.
|
| |
|
|
|
|
| |
The few gpsd_hexdump() calls left have explicit guards.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
That is, instead of sectioning out two little config defines and
putting them in. This makes gpsd.h self-copntained (e.g. in case it
gets installed as a library header) and means we can get rid of most
inclusions of it.
|
|
|
|
|
|
|
|
| |
packet_get() now always returns nonzero when it could either read
fresh data or assemble a packet from data already read and buffered --
no more returning 0 when it has assembled a packet from buffered data
but can't read any new data. I suspect this may have been causing
subtle bugs.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Update the packet regression test load.
Introduce new EOF_PACKET type to signal that the packet getter sees EOF.
All regression tests pass.
|
|
|
|
| |
Reenable some debugging in the packet getter, and add a bit more.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
gpscat now has an option that tried to invoke it.
All regression tests pass.
|
| |
|
|
It builds and imports without errors, but has not been tested yet.
|