rpm  5.4.10
rpmtcl.h
Go to the documentation of this file.
1 #ifndef RPMTCL_H
2 #define RPMTCL_H
3 
8 #include <rpmiotypes.h>
9 #include <rpmio.h>
10 
11 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmtcl_s * rpmtcl;
12 
13 /*@unchecked@*/
14 extern int _rpmtcl_debug;
15 
16 /*@unchecked@*/ /*@relnull@*/
17 extern rpmtcl _rpmtclI;
18 
19 #if defined(_RPMTCL_INTERNAL)
20 struct rpmtcl_s {
21  struct rpmioItem_s _item;
22  void * I; /* Tcl_Interp */
23  void * tclout; /* Tcl_Channel */
24  rpmiob iob;
25 #if defined(__LCLINT__)
26 /*@refs@*/
27  int nrefs;
28 #endif
29 };
30 #endif /* _RPMTCL_INTERNAL */
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
41 /*@unused@*/ /*@null@*/
42 rpmtcl rpmtclUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmtcl tcl)
43  /*@modifies tcl @*/;
44 #define rpmtclUnlink(_tcl) \
45  ((rpmtcl)rpmioUnlinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))
46 
52 /*@unused@*/ /*@newref@*/ /*@null@*/
53 rpmtcl rpmtclLink (/*@null@*/ rpmtcl tcl)
54  /*@modifies tcl @*/;
55 #define rpmtclLink(_tcl) \
56  ((rpmtcl)rpmioLinkPoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))
57 
63 /*@null@*/
64 rpmtcl rpmtclFree(/*@killref@*/ /*@null@*/rpmtcl tcl)
65  /*@globals fileSystem @*/
66  /*@modifies tcl, fileSystem @*/;
67 #define rpmtclFree(_tcl) \
68  ((rpmtcl)rpmioFreePoolItem((rpmioItem)(_tcl), __FUNCTION__, __FILE__, __LINE__))
69 
76 /*@newref@*/ /*@null@*/
77 rpmtcl rpmtclNew(/*@null@*/ char ** av, uint32_t flags)
78  /*@globals fileSystem, internalState @*/
79  /*@modifies fileSystem, internalState @*/;
80 
88 rpmRC rpmtclRunFile(rpmtcl tcl, /*@null@*/ const char * fn,
89  /*@null@*/ const char ** resultp)
90  /*@globals fileSystem, internalState @*/
91  /*@modifies tcl, fileSystem, internalState @*/;
92 
100 rpmRC rpmtclRun(rpmtcl tcl, /*@null@*/ const char * str,
101  /*@null@*/ const char ** resultp)
102  /*@globals fileSystem, internalState @*/
103  /*@modifies tcl, *resultp, fileSystem, internalState @*/;
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* RPMTCL_H */