rpm  5.4.10
rpmruby.h
Go to the documentation of this file.
1 #ifndef RPMRUBY_H
2 #define RPMRUBY_H
3 
25 #include <rpmiotypes.h>
26 #include <rpmio.h>
27 
29 /*@unchecked@*/
30 extern int _rpmruby_debug;
31 
32 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmruby_s* rpmruby;
33 
42 /*@unchecked@*/ /*@relnull@*/
43 extern rpmruby _rpmrubyI;
44 
45 #if defined(_RPMRUBY_INTERNAL)
46 
50 struct rpmruby_s {
51 
56  struct rpmioItem_s _item;
57 
59  void *I;
60 
64  unsigned long state;
65 
66 #if defined(__LCLINT__)
67 
68 /*@refs@*/
69  int nrefs;
70 #endif
71 };
72 #endif /* _RPMRUBY_INTERNAL */
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
85 /*@unused@*/ /*@null@*/
86 rpmruby rpmrubyUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmruby ruby)
87  /*@modifies ruby @*/;
88 #define rpmrubyUnlink(_ruby) \
89  ((rpmruby)rpmioUnlinkPoolItem((rpmioItem)(_ruby), __FUNCTION__, \
90  __FILE__, __LINE__))
91 
99 /*@unused@*/ /*@newref@*/ /*@null@*/
100 rpmruby rpmrubyLink (/*@null@*/ rpmruby ruby)
101  /*@modifies ruby @*/;
102 #define rpmrubyLink(_ruby) \
103  ((rpmruby)rpmioLinkPoolItem((rpmioItem)(_ruby), __FUNCTION__, \
104  __FILE__, __LINE__))
105 
113 /*@null@*/
114 rpmruby rpmrubyFree(/*@killref@*/ /*@null@*/ rpmruby ruby)
115  /*@globals fileSystem @*/
116  /*@modifies ruby, fileSystem @*/;
117 #define rpmrubyFree(_ruby) \
118  ((rpmruby)rpmioFreePoolItem((rpmioItem)(_ruby), __FUNCTION__, \
119  __FILE__, __LINE__))
120 
128 /*@newref@*/ /*@null@*/
129 rpmruby rpmrubyNew(/*@null@*/ char **av, uint32_t flags)
130  /*@globals fileSystem, internalState @*/
131  /*@modifies fileSystem, internalState @*/;
132 
142 rpmRC rpmrubyRun(rpmruby ruby, /*@null@*/ const char *str,
143  /*@null@*/ const char **resultp)
144  /*@globals fileSystem, internalState @*/
145  /*@modifies ruby, *resultp, fileSystem, internalState @*/;
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif /* RPMRUBY_H */