Petr Viktorin
2e74eec244
Python stable ABI: Adjust type usage & declarations
...
The previous commit removed all *_Type variables.
This adds them back, but as *pointers* to Python type objects
rather than type objects themselves.
All usages now need an extra pointer dereference (or removing an
address-of).
(The compiler will complain of type safety if we miss a spot,
so I'm OK using the original names.)
Also, add header declarations for the Spec structs.
2023-10-05 13:39:37 +03:00
Panu Matilainen
e8f777b69d
Switch python bindings to use rpm(Dbi)TagVal as appropriate
...
- None of these are true enum uses as the value typically originates
from python integers etc.
2010-10-22 11:57:38 +03:00
Panu Matilainen
e13a476fc9
Add conversion function for handling python unicode -> string issues
...
- In Python 3 everything is unicode, forcing each and every caller to
convert manually is a bit much.
2009-10-23 21:07:10 +03:00
Panu Matilainen
cab7c23976
Remove leftovers from python header files
...
- rpmSingleHeaderFromFD() and hdrLoad() are now implemented in python,
declarations accidentally left here
- make rpmMergeHeaders() static, nothing outside header-py.c needs
2009-10-19 17:21:31 +03:00
Panu Matilainen
9c88ea2c87
Deprecation tweaks
...
- use PyErr_WarnEx() for better control and leave the tracking up to python
- use PendingDeprecationWarning for now
- document the replacing functionality in the deprecation messages
- make hdr.sprintf() just an alias to hdr.format() without deprecating,
at least for now it'd be only a gratuitous incompatible change on python side
2009-10-01 15:12:06 +03:00
Panu Matilainen
b53f599596
Turn hdrGetHeader() into argument parsing converter interface
2009-09-30 12:11:43 +03:00
Panu Matilainen
07710f3033
Implement rpm.readHeaderListFromFD() in python instead of C
2009-09-28 16:07:09 +03:00
Panu Matilainen
36ada6c116
Make object allocation type agnostic
...
- pass (sub)type down to wrappers
- call subtype tp_alloc() instead of PyObject_New()
- preliminaries for allowing subtyping
2009-09-24 11:42:17 +03:00
Panu Matilainen
d55c5f6c30
Decouple python spec objects from transaction objects
...
- ts structure is only necessary for hysterically passing back the
parse result from parseSpec(), hide this in the bindings
- deprecate ts.parseSpec() for later ripping
2009-09-23 14:21:13 +03:00
Panu Matilainen
282efb6d4c
Turn tagNumFromPyObject() into an object converter interface
...
- permits direct validation and conversion from arg parsing
2009-09-23 12:28:47 +03:00
Panu Matilainen
2a8da8606f
Add type checking macros for all rpm python type objects
2009-09-23 00:06:13 +03:00
Panu Matilainen
14d5aaedcb
Lose the empty doxygen markers
...
- nothing wrong with comments but empty comment placeholders
are not exactly useful
2009-09-22 22:42:06 +03:00
Panu Matilainen
ed557bbcf0
Make all python object creation wrappers return PyObject pointers
...
- this way the only place where casts are needed are in the wrapper itself
2009-09-22 21:24:55 +03:00
Panu Matilainen
d718b12f5b
Mass convert (back) to rpmTag as it's usable everywhere now
...
- cast away a few cases where the enum usage causes ridiculous amount
of compiler warnings from unhandled switch-cases
2008-02-05 17:42:19 +02:00
Panu Matilainen
99faa2735b
rpmlib.h mass eviction
...
- explicitly include what's really needed instead
- document remaining uses
2008-01-30 13:53:51 +02:00
Panu Matilainen
7e56c6355b
Use rpm_tag_t everywhere for rpm (header) tag type
...
- typedef'ed as int32_t for now, negative values used in some places for
error cases
- easy to grep, easy to change...
- add RPMTAG_NOT_FOUND define, used in place of -1 "magic",
2007-12-13 19:32:37 +02:00
Panu Matilainen
9ce13e09ef
Switch to <rpm/foo.h> style for public headers
...
- adjust include paths accordingly
2007-12-08 14:02:32 +02:00
Ralf Corsépius
abeea80a38
Use #include <x.h> syntax to include public headers.
2007-11-23 06:46:19 +01:00
Ralf Corsépius
f25c04c1e4
Include "rpmlib.h" instead of <rpmlib.h>.
2007-10-28 06:47:31 +01:00
Ralf Corsépius
d2d4dae1ad
Formating cleanup.
2007-09-12 09:34:31 +02:00
Ralf Corsépius
3aad15624e
Remove split tags.
2007-09-11 15:28:26 +02:00
Panu Matilainen
431a6bc687
Get rpmcli.h includes out of python bindings
2007-08-30 17:06:14 +03:00
Panu Matilainen
5a3f376a2b
Rip out rhnLoad() and rhnUnload() from python bindings.
...
Prehistoric, unused and vendor specific stuff... time to go.
2007-07-12 15:46:31 +03:00
jbj
217c588baa
Build on macosx.
...
CVS patchset: 7701
CVS date: 2005/01/17 23:58:09
2005-01-17 23:58:09 +00:00
jbj
88ace07349
- python: bleeping keywords broke labelCompare.
...
CVS patchset: 7601
CVS date: 2004/11/25 15:52:44
2004-11-25 15:52:44 +00:00
pauln
24e6f8633e
Add kwargs everywhere - courtesy of pjones@redhat.com
...
CVS patchset: 7582
CVS date: 2004/11/17 17:05:39
2004-11-17 17:05:39 +00:00
niemeyer
96063191fc
- Adding support for integer keys in ts.dbMatch().
...
- Adding readHeaderFromFD().
CVS patchset: 7247
CVS date: 2004/05/04 21:12:04
2004-05-04 21:12:04 +00:00
jbj
3dcfeb3f9a
Merge changes from rpm-4.2.1 development.
...
CVS patchset: 6959
CVS date: 2003/11/23 19:50:52
2003-11-23 19:50:52 +00:00
jbj
c6156e0abd
Doxygen doco markup.
...
CVS patchset: 6760
CVS date: 2003/04/17 17:17:27
2003-04-17 17:17:27 +00:00
jbj
5211039a20
- python: the death of rpmdb-py.[ch], use ts.fooDB() methods instead.
...
- python: the death of rpm.headerFromPackage(), use ts.hdrFromFdno().
- python: permit direct ts.dbMatch() python iterations.
- python: the death of rpm.checksig(), use ts.hdrFromFdno() instead.
CVS patchset: 5603
CVS date: 2002/08/05 21:46:50
2002-08-05 21:46:50 +00:00
jbj
3ea74aa3c7
- python: sanity check fixes on rpmts/rpmte methods.
...
CVS patchset: 5554
CVS date: 2002/07/14 21:23:29
2002-07-14 21:23:29 +00:00
jbj
3b63310674
- add rpmal/rpmte/rpmfd methods to bindings.
...
- drop cpanflute and cpanflute2, will be in Chip's CPAN package now.
CVS patchset: 5452
CVS date: 2002/05/28 16:22:42
2002-05-28 16:22:42 +00:00
jbj
ed2765de23
rpmds and rpmfi iterators, take 0.
...
CVS patchset: 5445
CVS date: 2002/05/23 17:29:21
2002-05-23 17:29:21 +00:00
jbj
7dbc73fec6
Merge rpm-4.0.4 changes.
...
CVS patchset: 1256
CVS date: 1997/01/01 01:30:08
1997-01-01 01:30:08 +00:00