rpm  5.4.10
rpmpython.h
Go to the documentation of this file.
1 #ifndef RPMPYTHON_H
2 #define RPMPYTHON_H
3 
8 #include <rpmiotypes.h>
9 #include <rpmio.h>
10 
11 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmpython_s * rpmpython;
12 
13 /*@unchecked@*/
14 extern int _rpmpython_debug;
15 
16 /*@unchecked@*/ /*@relnull@*/
17 extern rpmpython _rpmpythonI;
18 
19 #if defined(_RPMPYTHON_INTERNAL)
20 struct rpmpython_s {
21  struct rpmioItem_s _item;
22  void * I; /* (unused) */
23 #if defined(__LCLINT__)
24 /*@refs@*/
25  int nrefs;
26 #endif
27 };
28 #endif /* _RPMPYTHON_INTERNAL */
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
39 /*@unused@*/ /*@null@*/
40 rpmpython rpmpythonUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmpython python)
41  /*@modifies python @*/;
42 #define rpmpythonUnlink(_python) \
43  ((rpmpython)rpmioUnlinkPoolItem((rpmioItem)(_python), __FUNCTION__, __FILE__, __LINE__))
44 
50 /*@unused@*/ /*@newref@*/ /*@null@*/
51 rpmpython rpmpythonLink (/*@null@*/ rpmpython python)
52  /*@modifies python @*/;
53 #define rpmpythonLink(_python) \
54  ((rpmpython)rpmioLinkPoolItem((rpmioItem)(_python), __FUNCTION__, __FILE__, __LINE__))
55 
61 /*@null@*/
62 rpmpython rpmpythonFree(/*@killref@*/ /*@null@*/rpmpython python)
63  /*@globals fileSystem @*/
64  /*@modifies python, fileSystem @*/;
65 #define rpmpythonFree(_python) \
66  ((rpmpython)rpmioFreePoolItem((rpmioItem)(_python), __FUNCTION__, __FILE__, __LINE__))
67 
74 /*@newref@*/ /*@null@*/
75 rpmpython rpmpythonNew(/*@null@*/ char ** av, uint32_t flags)
76  /*@globals fileSystem, internalState @*/
77  /*@modifies fileSystem, internalState @*/;
78 
86 rpmRC rpmpythonRunFile(rpmpython python, /*@null@*/ const char * fn,
87  /*@null@*/ const char ** resultp)
88  /*@globals fileSystem, internalState @*/
89  /*@modifies python, fileSystem, internalState @*/;
90 
98 rpmRC rpmpythonRun(rpmpython python, /*@null@*/ const char * str,
99  /*@null@*/ const char ** resultp)
100  /*@globals fileSystem, internalState @*/
101  /*@modifies python, *resultp, fileSystem, internalState @*/;
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* RPMPYTHON_H */